Repository navigation
Conversation
| PR_NUMBER: ${{ github.event.issue.number || inputs.pr_number }} | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| script: | |
There was a problem hiding this comment.
Instead of doing all this bespoke context gathering, have you tried just prompting Gemini and having it do the work? Something like:
Review the CI failures in PR XYZ. Summarize the failures and print them in format ...
This is similar to how the review bot works, and I empirically found that this worked better than trying to hydrate the correct context. It is more expensive, but the token count just won't be that high regardless in my experience. I am not sure if that holds here where parsing logs can be quite a pain
There was a problem hiding this comment.
Ok, tried to improve it. Thanks
|
/gemini review |
There was a problem hiding this comment.
📋 Review Summary
This PR adds a new PR Failure Summary GitHub Actions workflow (pr_failure_summary.yml) triggered via /summarize-failures comments or workflow_dispatch to cluster failing CI checks using Gemini CLI and post a sticky root-cause summary comment. It also updates pr-bot and contributor documentation to surface /summarize-failures and /gemini review.
🔍 General Feedback
- The security model for the
issue_commenttrigger is well thought out: PR code is not checked out (ref: 'master'with sparse checkout only forsetup-gh-cli-linux), Gemini CLI is restricted to an explicit read-only tool allowlist, and untrusted input is passed via files/env vars rather than interpolated into the shell script. - Moving
concurrencyfrom the workflow level to the job level inpr_failure_summary.ymlis recommended so unrelated PR comments do not cancel an in-progress failure summary run.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
Also, add /gemini review and /summarize-failures actions to documentation.