[ci] Failure Bot: run only on PR merge, allowed auto-retry#1289
[ci] Failure Bot: run only on PR merge, allowed auto-retry#1289nemesifier wants to merge 3 commits intomasterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
🧰 Additional context used🧠 Learnings (5)📓 Common learnings📚 Learning: 2026-03-19T16:14:29.698ZApplied to files:
📚 Learning: 2026-02-24T16:25:20.080ZApplied to files:
📚 Learning: 2026-03-14T19:34:33.773ZApplied to files:
📚 Learning: 2026-02-24T16:24:55.443ZApplied to files:
🔇 Additional comments (3)
📝 WalkthroughWalkthroughThe PR changes the GitHub Actions workflow Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/bot-ci-failure.yml:
- Line 11: The workflow currently sets a global `actions: write` permission;
remove that global `actions: write` and instead add `permissions: actions:
write` scoped to the `call-ci-failure-bot` job, while ensuring the `find-pr` job
uses only `permissions: actions: read` (or inherits default read) since it only
runs `gh pr view`, `gh api`, `gh pr list`. Locate the `actions: write` entry in
the top-level permissions, delete it, then add a `permissions` block under the
`call-ci-failure-bot` job with `actions: write` and keep `find-pr` job
permissions restricted to read.
- Line 21: The condition only triggers for workflow_run events with event ==
'pull_request', skipping merged-PR failures that produce a 'push' workflow_run;
update the if to catch both pull_request failures and post-merge pushes (e.g.
change the test to github.event.workflow_run.conclusion == 'failure' &&
(github.event.workflow_run.event == 'pull_request' ||
(github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'master'))) so the bot also runs for CI
failures from merged PRs on master; apply this change to the existing if
expression in the workflow (referencing github.event.workflow_run.event,
github.event.workflow_run.conclusion and github.event.workflow_run.head_branch).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: dbf69c66-d0e5-4ad8-bfe3-2b8039124a31
📒 Files selected for processing (1)
.github/workflows/bot-ci-failure.yml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Python==3.12 | django~=5.1.0
- GitHub Check: Python==3.12 | django~=5.2.0
- GitHub Check: Python==3.13 | django~=5.2.0
- GitHub Check: Python==3.10 | django~=5.2.0
- GitHub Check: Python==3.12 | django~=4.2.0
- GitHub Check: Python==3.11 | django~=5.2.0
- GitHub Check: Python==3.11 | django~=5.1.0
- GitHub Check: Python==3.13 | django~=5.1.0
- GitHub Check: Python==3.10 | django~=5.1.0
- GitHub Check: Python==3.10 | django~=4.2.0
- GitHub Check: Python==3.11 | django~=4.2.0
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: nemesifier
Repo: openwisp/openwisp-controller PR: 1233
File: .github/workflows/backport.yml:35-35
Timestamp: 2026-02-24T16:25:31.829Z
Learning: Repository: openwisp/openwisp-controller
File/Area: .github/workflows/backport.yml (backport-on-comment condition)
Learning: Project policy is to restrict the backport trigger via issue comments to users with author_association "MEMBER" or "OWNER" only; "COLLABORATOR" is intentionally excluded (per maintainer feedback on PR `#1233`).
📚 Learning: 2026-02-24T16:25:20.080Z
Learnt from: nemesifier
Repo: openwisp/openwisp-controller PR: 1233
File: .github/workflows/backport.yml:35-35
Timestamp: 2026-02-24T16:25:20.080Z
Learning: In .github/workflows/backport.yml, enforce that backport-on-comment triggers only for users with author_association MEMBE R or OWNER (COLLABORATOR excluded), reflecting maintainer feedback. Update the trigger condition to check author_association and restrict to MEMBERS/OWNERS; document rationale and PR `#1233` reference in code comments.
Applied to files:
.github/workflows/bot-ci-failure.yml
📚 Learning: 2026-02-24T16:24:55.443Z
Learnt from: nemesifier
Repo: openwisp/openwisp-controller PR: 1233
File: .github/workflows/backport.yml:22-22
Timestamp: 2026-02-24T16:24:55.443Z
Learning: In repositories within the OpenWISP organization, it is acceptable to reference reusable workflows from other OpenWISP-controlled repos using mutable refs (e.g., master) in .github/workflows. This is permissible due to the shared trust boundary within the organization. If applying this pattern, ensure the target repos are under the same organization and maintain awareness of potential breakages from upstream mutable refs; consider pinning to a tagged version for longer-term stability when appropriate.
Applied to files:
.github/workflows/bot-ci-failure.yml
Prettier Formatting FailureHello @nemesifier, The CI pipeline failed because of a Prettier formatting issue in the Fix: |
Updated the failure bot caller with respect to new improvements.
Prettier Formatting FailureHello @nemesifier and @stktyagi, The CI failed because of a Prettier formatting issue in the Fix: |
Checklist
Description of Changes
Run the workflow only when pull requests are merged. Enabled auto-retry by adding write permissions to the action workflow.