Skip to content

Commit 98ea9eb

Browse files
committed
escape JSON better
1 parent 516d31c commit 98ea9eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/migrator_uniqueness.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
# that's only available through graphql apparently
4949
query='
5050
query {
51-
search(query:"org:conda-forge path:.ci_support/migrations/python314t.yaml", type: CODE, first: 10) {
51+
search(query:"org:conda-forge path:.ci_support/migrations/$migrator", type: CODE, first: 10) {
5252
codeCount
5353
nodes {
5454
... on Code {
@@ -58,10 +58,10 @@ jobs:
5858
}
5959
}
6060
}'
61-
response=$(curl -s -H "Authorization: bearer $GH_TOKEN" \
62-
-H "Content-Type: application/json" \
63-
-d "{\"query\": \"$query\"}" \
64-
https://api.github.com/graphql)
61+
response=$(jq -n --arg q "$query" '{query: $q}' | \
62+
curl -s -H "Authorization: bearer $GH_TOKEN" \
63+
-H "Content-Type: application/json" \
64+
-d @- https://api.github.com/graphql)
6565
6666
echo "Sent $query"
6767
echo "Got $response"

0 commit comments

Comments
 (0)