Skip to content

Instantly share code, notes, and snippets.

@kartben
Last active January 29, 2025 07:52
Show Gist options
  • Save kartben/7d7001cbf75e0e7ffda8e73120b13a86 to your computer and use it in GitHub Desktop.
Save kartben/7d7001cbf75e0e7ffda8e73120b13a86 to your computer and use it in GitHub Desktop.
PRs with failed compliance check
gh pr list --state open --json number,title,url,statusCheckRollup --limit 50 -S "status:failure" \
| jq -r '
.[] |
. as $pr |
[ $pr.statusCheckRollup[]? |
select(
.__typename == "CheckRun" and
(.name | contains("Run compliance checks")) and
.conclusion == "FAILURE"
)
] as $checks |
select($checks | length > 0) |
"PR #\($pr.number): \($pr.title)\nURL: \($pr.url)\nCompliance Checks Status:",
( $checks[] | " - \(.name): \(.conclusion)" ),
""
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment