[ci] Enabled changelog bot from openwisp-utils#1352
[ci] Enabled changelog bot from openwisp-utils#1352nemesifier merged 2 commits intoopenwisp:masterfrom
Conversation
📝 WalkthroughWalkthroughThis PR introduces two complementary GitHub Actions workflows to automate changelog generation for the OpenWISP Controller repository. The trigger workflow ( Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The changelog bot workflow implementation looks good. The PR number validation in Files Reviewed (2 files)
Reviewed by kimi-k2.5-0127 · 82,864 tokens |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/bot-changelog-trigger.yml:
- Around line 33-38: The Upload PR metadata step uses actions/upload-artifact@v7
and currently writes an artifact named changelog-metadata without allowing
overwrites; update the step (the "Upload PR metadata" job using
actions/upload-artifact@v7) to include overwrite: true under the with block so
repeated runs or re-approvals can replace the existing changelog-metadata
artifact without failing.
- Around line 13-15: Update the conditional that checks
github.event.review.author_association to remove the 'COLLABORATOR' branch so
only 'OWNER' and 'MEMBER' are allowed; specifically edit the expression that
currently tests (github.event.review.author_association == 'OWNER' ||
github.event.review.author_association == 'MEMBER' ||
github.event.review.author_association == 'COLLABORATOR') to drop the
COLLABORATOR comparison so it becomes only OWNER or MEMBER, ensuring the
workflow trigger aligns with the repo policy.
🪄 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: c7520ad8-2105-4aa4-9428-233146265c9d
📒 Files selected for processing (2)
.github/workflows/bot-changelog-runner.yml.github/workflows/bot-changelog-trigger.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). (12)
- GitHub Check: Python==3.10 | django~=4.2.0
- GitHub Check: Python==3.11 | django~=5.1.0
- GitHub Check: Python==3.12 | django~=5.1.0
- GitHub Check: Python==3.11 | django~=5.2.0
- GitHub Check: Python==3.13 | django~=5.1.0
- GitHub Check: Python==3.13 | django~=5.2.0
- GitHub Check: Python==3.10 | django~=5.2.0
- GitHub Check: Python==3.11 | django~=4.2.0
- GitHub Check: Python==3.12 | django~=4.2.0
- GitHub Check: Python==3.12 | django~=5.2.0
- GitHub Check: Python==3.10 | django~=5.1.0
- GitHub Check: Kilo Code Review
🧰 Additional context used
🧠 Learnings (2)
📚 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-changelog-runner.yml.github/workflows/bot-changelog-trigger.yml
📚 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-changelog-runner.yml.github/workflows/bot-changelog-trigger.yml
| (github.event.review.author_association == 'OWNER' || | ||
| github.event.review.author_association == 'MEMBER' || | ||
| github.event.review.author_association == 'COLLABORATOR') |
There was a problem hiding this comment.
Remove COLLABORATOR from the allowed author_association values.
The established policy for this repo (set in PR #1233 for the backport workflow) restricts automated privileged triggers to OWNER and MEMBER only — COLLABORATOR is explicitly excluded per maintainer feedback. Including COLLABORATOR here is inconsistent with that policy and widens the trust boundary beyond what was approved.
🔒 Proposed fix
if: |
github.event.review.state == 'approved' &&
(github.event.review.author_association == 'OWNER' ||
- github.event.review.author_association == 'MEMBER' ||
- github.event.review.author_association == 'COLLABORATOR')
+ github.event.review.author_association == 'MEMBER')Based on learnings: "enforce that backport-on-comment triggers only for users with author_association MEMBER or OWNER (COLLABORATOR excluded), reflecting maintainer feedback."
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| (github.event.review.author_association == 'OWNER' || | |
| github.event.review.author_association == 'MEMBER' || | |
| github.event.review.author_association == 'COLLABORATOR') | |
| (github.event.review.author_association == 'OWNER' || | |
| github.event.review.author_association == 'MEMBER') |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/bot-changelog-trigger.yml around lines 13 - 15, Update the
conditional that checks github.event.review.author_association to remove the
'COLLABORATOR' branch so only 'OWNER' and 'MEMBER' are allowed; specifically
edit the expression that currently tests (github.event.review.author_association
== 'OWNER' || github.event.review.author_association == 'MEMBER' ||
github.event.review.author_association == 'COLLABORATOR') to drop the
COLLABORATOR comparison so it becomes only OWNER or MEMBER, ensuring the
workflow trigger aligns with the repo policy.
| - name: Upload PR metadata | ||
| if: steps.check.outputs.has_noteworthy == 'true' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: changelog-metadata | ||
| path: pr_number |
There was a problem hiding this comment.
Add overwrite: true to handle re-approvals gracefully.
actions/upload-artifact@v7 defaults to overwrite: false, so if the same PR is dismissed and re-approved (causing a second trigger), the upload step will fail because the artifact changelog-metadata already exists. Add overwrite: true to allow safe re-runs.
🛠️ Proposed fix
- name: Upload PR metadata
if: steps.check.outputs.has_noteworthy == 'true'
uses: actions/upload-artifact@v7
with:
name: changelog-metadata
path: pr_number
+ overwrite: true📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Upload PR metadata | |
| if: steps.check.outputs.has_noteworthy == 'true' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: changelog-metadata | |
| path: pr_number | |
| - name: Upload PR metadata | |
| if: steps.check.outputs.has_noteworthy == 'true' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: changelog-metadata | |
| path: pr_number | |
| overwrite: true |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/bot-changelog-trigger.yml around lines 33 - 38, The Upload
PR metadata step uses actions/upload-artifact@v7 and currently writes an
artifact named changelog-metadata without allowing overwrites; update the step
(the "Upload PR metadata" job using actions/upload-artifact@v7) to include
overwrite: true under the with block so repeated runs or re-approvals can
replace the existing changelog-metadata artifact without failing.
Test Failure in
|
|
The CI is failing due to transient infrastructure issues (not related to your code). I have restarted the failed jobs automatically (1/3). |
Checklist
Reference to Existing Issue
Closes #1271
Description of Changes
Added a changelog bot workflow to automatically update changelogs when PRs are approved.