Created
January 5, 2021 12:36
-
-
Save metacoma/c5724a236574da2f6ae2680b28a8be75 to your computer and use it in GitHub Desktop.
pr check prototype
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
#!/bin/sh | |
OWNER=mgm-sandbox | |
REPO=magma | |
PR_ID=4 | |
generate_pr_status_gql() { | |
cat<<EOF | |
{ | |
repository(owner: "$OWNER", name: "$REPO") { | |
pullRequest(number: 4) { | |
url | |
labels(last: 100) { | |
nodes { | |
name | |
} | |
} | |
reviews(last: 1) { | |
totalCount | |
nodes { | |
state | |
} | |
} | |
reviewDecision | |
} | |
} | |
} | |
EOF | |
} | |
generate_pr_status_gql $OWNER $REPO | gh api graphql -f query="`cat`" | |
gh pr checks $PR_ID -R $OWNER/$REPO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example output:
All checks were successful
0 failing, 3 successful, and 0 pending checks
✓ continuous-integration/circle https://circleci.com
✓ continuous-integration/integration-test https://jenkins.mgm.metacoma.io
✓ continuous-integration/jenkins https://jenkins.mgm.metacoma.io