Merge pull request #322 from ZeusWPI/zeuswpi-bot

Zeuswpi bot
This commit is contained in:
redfast00 2019-03-08 06:21:52 +01:00 committed by GitHub
commit 36d4bf3436
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,8 +18,7 @@ fi
# Get the GraphQL ID # Get the GraphQL ID
PR_ID=$(echo $RESULT | sed 's/.*"id":"\([^"]*\)".*/\1/') PR_ID=$(echo $RESULT | sed 's/.*"id":"\([^"]*\)".*/\1/')
# TODO: Have another user do the commenting if [[ $RESULT == *"zeuswpi-bot"* ]]; then
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}}"