Skip to content
Discussion options

You must be logged in to vote

Actually figured a shell script of sorts using some of the APIs gets me there "good enough" to see if recently there were any annotations anywhere:

# Get all repos
repos=$(gh api /orgs/ORGANIZATION/repos?sort=full_name --jq .[].full_name)

ago=$(date -r $(($(date +%s) - 10800)) -Iseconds)

for repo in $repos; do
  echo "Checking repo $repo"
  # For each repo, get the check suite ID
  check_suite_ids=$(gh api "/repos/$repo/actions/runs?created=>=$ago" --jq .workflow_runs.[].check_suite_id)

  # For each suite, get the annotation URLs
  for check_suite_id in $check_suite_ids; do
    annotation_urls=$(gh api "/repos/$repo/check-suites/$check_suite_id/check-runs" --jq .check_runs.[].output.an…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by mfn
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@BenHenning
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question Ask and answer questions about GitHub features and usage
4 participants