Last active
October 26, 2021 18:09
Revisions
-
kyanny revised this gist
Oct 26, 2021 . No changes.There are no files selected for viewing
-
kyanny revised this gist
Oct 26, 2021 . 1 changed file with 2 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,7 @@ #!/bin/bash # Usage: bash graphql.sh < query.txt query=$(cat - | sed -e 's/"/\\"/g' | tr -d '\n') cat <<EOM> query.json {"query":"$query"} -
kyanny created this gist
Oct 26, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/bin/bash cat > query.txt <<EOM { license(key:"mit") { name description } } EOM query=$(cat query.txt | sed -e 's/"/\\"/g' | tr -d '\n') cat <<EOM> query.json {"query":"$query"} EOM curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/graphql -d @query.json