Adapting the release notes workflow to the project.#158
Conversation
WalkthroughTwo GitHub release automation workflows are updated: Python runtime upgraded to 3.14, license headers removed, release notes action configuration revised with new chapters and row formats, tag creation switched to annotated tags via API, and step naming standardized. ChangesRelease Automation Workflows
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 inconclusive)
✅ Passed checks (2 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/release_draft.yml (1)
69-113: ⚡ Quick winDeclare the token scopes explicitly for the write path.
These steps need
contents: write, but the job currently inherits whatever the repository defaultGITHUB_TOKENpermissions happen to be. That makes release drafting settings-dependent and can fail outright when the default is read-only.Suggested change
jobs: release-draft: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: read + issues: read steps:🤖 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/release_draft.yml around lines 69 - 113, Add explicit GITHUB_TOKEN permissions for the steps that create tags and draft the release by setting the job or workflow permissions to include contents: write so the Create and push tag step (which calls github.rest.git.createTag and github.rest.git.createRef) and the Create draft release step (softprops/action-gh-release) have write access; update the workflow top-level or job-level permissions to include "contents: write" rather than relying on repository defaults.
🤖 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/release_draft.yml:
- Around line 53-67: The release notes workflow (release-notes-title/chapters in
release_draft.yml) doesn't exclude PRs labeled "no RN", causing them to show up;
mirror the behavior from check_pr_release_notes.yml by adding a hidden chapter
entry for the "no RN" label (e.g., add an item like { title: No RN 🚫, label: no
RN, hidden: true, order: 99 } or include "no RN" in the existing hidden chapter)
so PRs with label "no RN" are omitted from generated notes; update the chapters
list accordingly to reference the exact label string used by
check_pr_release_notes.yml.
---
Nitpick comments:
In @.github/workflows/release_draft.yml:
- Around line 69-113: Add explicit GITHUB_TOKEN permissions for the steps that
create tags and draft the release by setting the job or workflow permissions to
include contents: write so the Create and push tag step (which calls
github.rest.git.createTag and github.rest.git.createRef) and the Create draft
release step (softprops/action-gh-release) have write access; update the
workflow top-level or job-level permissions to include "contents: write" rather
than relying on repository defaults.
🪄 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: CHILL
Plan: Pro
Run ID: a348e78b-141b-4607-b946-0cd44757243d
📒 Files selected for processing (2)
.github/workflows/check_pr_release_notes.yml.github/workflows/release_draft.yml
| release-notes-title: "## [Rr]elease [Nn]otes" | ||
| tag-name: ${{ github.event.inputs.tag-name }} | ||
| from-tag-name: ${{ github.event.inputs.from-tag-name }} | ||
| chapters: | | ||
| - {"title": "Entries to skip 🚫", "label": "duplicate"} | ||
| - {"title": "Entries to skip 🚫", "label": "invalid"} | ||
| - {"title": "Entries to skip 🚫", "label": "wontfix"} | ||
| - {"title": "Entries to skip 🚫", "label": "no RN"} | ||
| - {"title": "Breaking Changes 💥", "label": "breaking change"} | ||
| - {"title": "Security updates 👮", "label": "security"} | ||
| - {"title": "New Features 🎉", "label": "enhancement"} | ||
| - {"title": "Bugfixes 🛠", "label": "bug"} | ||
| - {"title": "Epics 📖", "label": "epic"} | ||
| - {"title": "Infrastructure ⚙️", "label": "infrastructure"} | ||
| - {"title": "Silent-live 🤫", "label": "silent live"} | ||
| - {"title": "Documentation 📜", "label": "documentation"} | ||
| duplicity-scope: 'none' | ||
| - { title: Breaking Changes 💥, label: breaking change, order: 10 } | ||
| - { title: New Features 🎉, label: enhancement, order: 20 } | ||
| - { title: Bugfixes 🛠, label: bug, order: 30 } | ||
| - { title: Infrastructure ⚙️, label: infrastructure, order: 40 } | ||
| - { title: Refactoring 🚀, label: refactoring, order: 50 } | ||
| - { title: Documentation 📜, label: documentation, order: 60 } | ||
| - { title: No entry 🚫, label: duplicate, hidden: true, order: 99 } | ||
| warnings: true | ||
| skip-release-notes-labels: "no RN,duplicate,invalid,wontfix" | ||
| print-empty-chapters: false | ||
| row-format-issue: '_{title}_ {developers} in {number}' | ||
| row-format-pr: '_{title}_ {developers} in {number}' | ||
| row-format-link-pr: true | ||
| hierarchy: true | ||
| row-format-issue: '{type}: {number} _{title}_ by {developers} in {pull-requests}' | ||
| row-format-pr: '{number} _{title}_ by {developers}' |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== List workflows ==="
ls -la .github/workflows || true
echo
echo "=== release_draft.yml (lines 40-90) ==="
nl -ba .github/workflows/release_draft.yml | sed -n '40,90p'
echo
echo "=== check_pr_release_notes.yml (find skip-labels + relevant section) ==="
# If file name differs, locate it
if [ -f .github/workflows/check_pr_release_notes.yml ]; then
nl -ba .github/workflows/check_pr_release_notes.yml | sed -n '1,200p'
else
echo "File not found: .github/workflows/check_pr_release_notes.yml"
echo "Searching for 'check_pr_release_notes' and 'skip-labels'..."
rg -n "check_pr_release_notes|skip-labels" .github/workflows -S || true
fi
echo
echo "=== Search for 'skip-labels' in workflows ==="
rg -n "skip-labels" .github/workflows -S || true
echo
echo "=== Search for 'duplicate' label usage in release note workflows ==="
rg -n "duplicate" .github/workflows -S || true
echo
echo "=== Search for release-notes generator config (chapters/hidden) ==="
rg -n "release-notes-title|chapters:|print-empty-chapters|row-format-issue|row-format-pr|hidden:" .github/workflows -S || trueRepository: AbsaOSS/EventGate
Length of output: 576
🏁 Script executed:
#!/bin/bash
set -euo pipefail
show_with_numbers() {
local file="$1"
local start="$2"
local end="$3"
awk -v s="$start" -v e="$end" '{if(NR>=s && NR<=e) printf "%4d\t%s\n", NR, $0}' "$file"
}
echo "=== release_draft.yml (around chapters/hidden config) ==="
show_with_numbers .github/workflows/release_draft.yml 1 200 | sed -n '1,160p'
echo
echo "=== release_draft.yml (requested lines 40-120) ==="
show_with_numbers .github/workflows/release_draft.yml 40 120
echo
echo "=== check_pr_release_notes.yml (whole file, small) ==="
show_with_numbers .github/workflows/check_pr_release_notes.yml 1 250
echo
echo "=== Search for key strings ==="
rg -n "skip-labels|hidden:|duplicate|no RN|release-notes-title|chapters:" .github/workflows -S || trueRepository: AbsaOSS/EventGate
Length of output: 9948
Align the release-notes exclusion label across workflows.
check_pr_release_notes.yml skips PRs with skip-labels: 'no RN', but release_draft.yml only hides label: duplicate (hidden: true) and has no corresponding hidden chapter for no RN. As a result, PRs labeled no RN may still appear in generated release notes under other (visible) chapter labels.
🤖 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/release_draft.yml around lines 53 - 67, The release notes
workflow (release-notes-title/chapters in release_draft.yml) doesn't exclude PRs
labeled "no RN", causing them to show up; mirror the behavior from
check_pr_release_notes.yml by adding a hidden chapter entry for the "no RN"
label (e.g., add an item like { title: No RN 🚫, label: no RN, hidden: true,
order: 99 } or include "no RN" in the existing hidden chapter) so PRs with label
"no RN" are omitted from generated notes; update the chapters list accordingly
to reference the exact label string used by check_pr_release_notes.yml.
| const sha = context.sha; // The SHA of the commit to tag | ||
| const tagMessage = `${tag} released by GitHub Action`; | ||
|
|
||
| const tagObject = await github.rest.git.createTag({ |
There was a problem hiding this comment.
what if the tag exists?
There was a problem hiding this comment.
Error: The tag already exists in the repository.
Overview
This pull request updates the GitHub Actions workflows for release note checks and automated release drafting. The main changes include updating Python versions, improving tag creation, updating the release notes generation action and its configuration, and making minor improvements to workflow step naming and documentation.
Release Notes
Related
Closes #156
Summary by CodeRabbit