Last active
June 2, 2021 18:20
-
-
Save hexium310/a9749ca80687f8a46cb8d7d9438d6221 to your computer and use it in GitHub Desktop.
queryのみが書かれたファイルをgh api graphql --inputでつかうやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gh api graphql --input <(jq -n --arg owner hexium310 --arg name brew-uo --arg query "$(cat file | tr '\n' ' ')" '{ query: $query, variables: { owner: $owner, name: $name } }') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query($name: String!, $owner: String!) { | |
repository(owner: $owner, name: $name) { | |
releases(last: 3) { | |
nodes { tagName } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment