bugfix
This commit is contained in:
parent
e58b818223
commit
605930927e
1 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,8 @@ PR_NR=$TRAVIS_PULL_REQUEST
|
||||||
|
|
||||||
function performQuery() {
|
function performQuery() {
|
||||||
NEW_QUERY_STR="{\"query\":\"$1\"}"
|
NEW_QUERY_STR="{\"query\":\"$1\"}"
|
||||||
curl -s -H "Authorization: bearer $COMMENT_TOKEN" -X POST -d $NEW_QUERY_STR https://api.github.com/graphql
|
echo $NEW_QUERY_STR
|
||||||
|
curl -s -H "Authorization: bearer $COMMENT_TOKEN" -X POST -d "$NEW_QUERY_STR" https://api.github.com/graphql
|
||||||
}
|
}
|
||||||
|
|
||||||
RESULT=$(performQuery "{repository(owner:\\\"ZeusWPI\\\",name:\\\"zeus.ugent.be\\\"){pullRequest(number:$PR_NR){id,comments(first:10){nodes{author{login}}}}}}")
|
RESULT=$(performQuery "{repository(owner:\\\"ZeusWPI\\\",name:\\\"zeus.ugent.be\\\"){pullRequest(number:$PR_NR){id,comments(first:10){nodes{author{login}}}}}}")
|
||||||
|
@ -22,7 +23,7 @@ if [[ $RESULT == *"werthen"* ]]; then
|
||||||
echo "User has already commented"
|
echo "User has already commented"
|
||||||
else
|
else
|
||||||
ADD_COMMENT_STR="mutation{addComment(input:{subjectId:\\\"$PR_ID\\\",body:\\\"Check out the preview on https://$PR_NR.pr.zeus.gent/\\\"}){clientMutationId}}"
|
ADD_COMMENT_STR="mutation{addComment(input:{subjectId:\\\"$PR_ID\\\",body:\\\"Check out the preview on https://$PR_NR.pr.zeus.gent/\\\"}){clientMutationId}}"
|
||||||
performQuery $ADD_COMMENT_STR
|
performQuery "$ADD_COMMENT_STR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue