Conversation
When the PR Actions Detective or Branch Actions Detective runs against a workflow run that has no failed jobs, the agent now calls noop instead of posting a comment or creating an issue. This prevents noisy output on successful runs. Fixes: Noop on no failure Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
📝 WalkthroughWalkthroughThis PR modifies multiple GitHub Actions Detective workflow files to add an early-exit condition. When enumerating jobs from a workflow run, if no job has a failure conclusion, the workflows now invoke a noop operation with the message "No failed jobs in workflow run; nothing to report" and halt further processing. This prevents unnecessary log downloads and analysis steps. The corresponding documentation files have been updated to reflect this new noop output behavior across the branch, PR, and CI detective workflows. Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/gh-aw-pr-actions-detective.md (1)
97-103:⚠️ Potential issue | 🟠 MajorAdd
--paginateto fetch all jobs before checking for failures.The
gh apicall on line 100 only retrieves the first page of results (default 30 jobs). Without the--paginateflag, failing jobs on subsequent pages will be missed, causing the noop guard to incorrectly report success on genuinely failing runs. Add--paginateto ensure all jobs are fetched before deciding whether to proceed.Suggested fix
- ```bash - gh api repos/${{ github.repository }}/actions/runs/{run_id}/jobs \ - --jq '.jobs[] | {id: .id, name: .name, conclusion: .conclusion, html_url: .html_url}' - ``` + ```bash + gh api --paginate repos/${{ github.repository }}/actions/runs/{run_id}/jobs \ + --jq '.jobs[] | {id: .id, name: .name, conclusion: .conclusion, html_url: .html_url}' + ```🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/gh-aw-pr-actions-detective.md around lines 97 - 103, The gh api call that lists jobs (the command invoking gh api with the jq filter '.jobs[] | {id: .id, name: .name, conclusion: .conclusion, html_url: .html_url}') only fetches the first page; add the --paginate flag to that gh api invocation so all jobs are returned before evaluating conclusions, and keep the noop guard that emits "No failed jobs in workflow run; nothing to report" but run it against the full paginated result set.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In @.github/workflows/gh-aw-pr-actions-detective.md:
- Around line 97-103: The gh api call that lists jobs (the command invoking gh
api with the jq filter '.jobs[] | {id: .id, name: .name, conclusion:
.conclusion, html_url: .html_url}') only fetches the first page; add the
--paginate flag to that gh api invocation so all jobs are returned before
evaluating conclusions, and keep the noop guard that emits "No failed jobs in
workflow run; nothing to report" but run it against the full paginated result
set.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9e89b929-a963-4ed2-94c6-f3d7efbba3cb
📒 Files selected for processing (7)
.github/workflows/gh-aw-branch-actions-detective.lock.yml.github/workflows/gh-aw-branch-actions-detective.md.github/workflows/gh-aw-pr-actions-detective.lock.yml.github/workflows/gh-aw-pr-actions-detective.md.github/workflows/gh-aw-pr-ci-detective.lock.ymlgh-agent-workflows/branch-actions-detective/README.mdgh-agent-workflows/pr-actions-detective/README.md
There was a problem hiding this comment.
I’m requesting changes because the new early-exit rule can suppress legitimate failure triage.
- In
.github/workflows/gh-aw-pr-actions-detective.md:103and.github/workflows/gh-aw-branch-actions-detective.md:112, the new guard noops when no job has conclusionfailure, but failed runs can still occur via non-failureterminal conclusions (for example timeout/cancel-style outcomes), which would now be silently skipped. - The same new noop decision is made immediately after a single
gh api .../actions/runs/{run_id}/jobscall; without explicit pagination, large runs can miss later failed jobs and incorrectly noop.
Please broaden the failure-condition check and ensure the jobs set is fully enumerated before deciding to noop.
What is this? | From workflow: Trigger PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
The PR Actions Detective can post a comment even when a workflow run has no failed jobs (example). Although the trigger workflow filters on
conclusion == 'failure', the detective prompts did not explicitly require a no-op when all listed jobs are non-failing.What changed
.github/workflows/gh-aw-pr-actions-detective.md,.github/workflows/gh-aw-branch-actions-detective.md): after listing job conclusions in Step 1, explicitly callnoopwhen no jobs have afailureconclusion..github/workflows/gh-aw-*-detective.lock.yml): regenerated metadata to reflect the prompt updates.gh-agent-workflows/pr-actions-detective/README.md,gh-agent-workflows/branch-actions-detective/README.md): documentnoopas a supported safe output for the no-failure case.Fixes #605
The body of this PR is automatically managed by the Trigger Update PR Body workflow.