ci: generate release body and update changelog#523
Conversation
WalkthroughThe release workflow is restructured to generate three separate markdown files: RELEASE_NOTES.md for categorized release information, RELEASE_BODY.md for the GitHub release body, and CHANGELOG.md for changelog documentation. The workflow now includes distinct steps for each output and commits all updated files to the main branch. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 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)
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.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
131-137: Fragile assumption on header line count.The
tail -n +7assumes the CHANGELOG.md header is exactly 6 lines. While the workflow controls this header, any manual edits to the header block could cause content loss or duplication.Consider adding a comment documenting this assumption, or using a marker-based approach:
♻️ Optional: Marker-based approach
# Append previous changelog content (skip the header block — first 6 lines) + # NOTE: Header is regenerated each release (lines 1-6). Line 7+ contains version entries. if [ -f CHANGELOG.md ]; then tail -n +7 CHANGELOG.md fiAlternatively, use a marker pattern for more robustness:
# Skip to first version entry if [ -f CHANGELOG.md ]; then sed -n '/^## \[v/,$p' CHANGELOG.md fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/release.yml around lines 131 - 137, The workflow uses a fragile fixed-line skip (tail -n +7) when appending CHANGELOG.md into CHANGELOG_NEW.md which can lose or duplicate content if the header length changes; replace this with a marker-based extraction (e.g., locate the first version heading such as lines matching the pattern used for releases) or at minimum add an explicit comment explaining the 6-line header assumption; update the block that reads CHANGELOG.md (the tail -n +7 invocation and surrounding if [ -f CHANGELOG.md ] check that writes to CHANGELOG_NEW.md) to use a robust sed/grep extraction that starts from the first version entry (or document the assumption) and keep the mv CHANGELOG_NEW.md CHANGELOG.md step unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/release.yml:
- Around line 131-137: The workflow uses a fragile fixed-line skip (tail -n +7)
when appending CHANGELOG.md into CHANGELOG_NEW.md which can lose or duplicate
content if the header length changes; replace this with a marker-based
extraction (e.g., locate the first version heading such as lines matching the
pattern used for releases) or at minimum add an explicit comment explaining the
6-line header assumption; update the block that reads CHANGELOG.md (the tail -n
+7 invocation and surrounding if [ -f CHANGELOG.md ] check that writes to
CHANGELOG_NEW.md) to use a robust sed/grep extraction that starts from the first
version entry (or document the assumption) and keep the mv CHANGELOG_NEW.md
CHANGELOG.md step unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 866da929-c401-4158-bb89-fd018563cfbd
📒 Files selected for processing (1)
.github/workflows/release.yml
Summary by CodeRabbit