fix(release): generate per-release changelog in release notes (#191)#222
fix(release): generate per-release changelog in release notes (#191)#222michaelweber merged 2 commits intomainfrom
Conversation
Replace the static hardcoded body with a dynamic release notes step that calls the GitHub releases/generate-notes API to produce a "What's Changed" section (linked PRs between the previous and current tag). The download table and installation instructions are appended after the changelog.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Gemini review skipped — non-code PR (only changed files matching |
|
Codex review skipped — non-code PR (only changed files matching |
|
Claude review skipped — non-code PR (only changed files matching |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe release workflow's "Generate release notes" step was rewritten to dynamically generate changelog content using the GitHub CLI ( ✨ 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: 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/release-new.yml:
- Around line 482-483: Update the release-notes printf lines that reference
static filenames 'titus-burp.jar' and 'titus-browser-extension.zip' to use the
versioned artifact names 'titus-burp-${VERSION}.jar' and
'titus-browser-extension-${VERSION}.zip' (using whatever VERSION variable is
defined in the workflow) so the README/release notes match the actual produced
artifacts.
- Around line 459-463: The release step currently silences failures by appending
"2>/dev/null || true" to the gh api call that generates changelog.md; change
this so the gh api repos/.../releases/generate-notes call fails the job on error
(remove the stderr discard and the "|| true") and propagate the non‑zero exit
(for example let the command exit non‑zero or explicitly check its exit status
and exit 1), so failures to generate notes produce a visible CI error instead of
an empty changelog.md.
🪄 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: 82503568-6e0e-48b6-8350-c7565735fdc2
📒 Files selected for processing (1)
.github/workflows/release-new.yml
| gh api repos/${{ github.repository }}/releases/generate-notes \ | ||
| -f tag_name="${{ env.VERSION }}" \ | ||
| -f previous_tag_name="$PREV_TAG" \ | ||
| --jq '.body' > changelog.md 2>/dev/null || true | ||
| fi |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the workflow currently suppresses generate-notes failures.
rg -n -C2 'releases/generate-notes|2>/dev/null|\|\| true' .github/workflows/release-new.ymlRepository: praetorian-inc/titus
Length of output: 1496
Fail fast on changelog API errors.
The 2>/dev/null || true at line 462 hides failures silently, risking releases without "What's Changed" content and no CI signal.
Suggested fix
- if [ -n "$PREV_TAG" ]; then
- gh api repos/${{ github.repository }}/releases/generate-notes \
- -f tag_name="${{ env.VERSION }}" \
- -f previous_tag_name="$PREV_TAG" \
- --jq '.body' > changelog.md 2>/dev/null || true
- fi
+ if [ -n "$PREV_TAG" ]; then
+ if ! gh api repos/${{ github.repository }}/releases/generate-notes \
+ -f tag_name="${{ env.VERSION }}" \
+ -f previous_tag_name="$PREV_TAG" \
+ --jq '.body' > changelog.md; then
+ echo "::error::Failed to generate changelog for ${VERSION} from ${PREV_TAG}"
+ exit 1
+ fi
+ fi📝 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.
| gh api repos/${{ github.repository }}/releases/generate-notes \ | |
| -f tag_name="${{ env.VERSION }}" \ | |
| -f previous_tag_name="$PREV_TAG" \ | |
| --jq '.body' > changelog.md 2>/dev/null || true | |
| fi | |
| if [ -n "$PREV_TAG" ]; then | |
| if ! gh api repos/${{ github.repository }}/releases/generate-notes \ | |
| -f tag_name="${{ env.VERSION }}" \ | |
| -f previous_tag_name="$PREV_TAG" \ | |
| --jq '.body' > changelog.md; then | |
| echo "::error::Failed to generate changelog for ${VERSION} from ${PREV_TAG}" | |
| exit 1 | |
| fi | |
| fi |
🤖 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-new.yml around lines 459 - 463, The release step
currently silences failures by appending "2>/dev/null || true" to the gh api
call that generates changelog.md; change this so the gh api
repos/.../releases/generate-notes call fails the job on error (remove the stderr
discard and the "|| true") and propagate the non‑zero exit (for example let the
command exit non‑zero or explicitly check its exit status and exit 1), so
failures to generate notes produce a visible CI error instead of an empty
changelog.md.
- Replace '2>/dev/null || true' with proper error handling: API failures emit a warning to stderr rather than silently producing empty notes - Fix Burp/browser extension filenames to include version suffix, matching the actual artifacts produced by the build steps
Summary
Closes #191.
The "Generate release notes" step previously wrote a hardcoded static body for every release, so subscribers had no idea what changed between versions.
Changes:
gh api .../releases/generate-noteswith the previous tag to produce a GitHub-formatted "What's Changed" section (linked PRs, contributors, full-changelog link)Test plan
workflow_dispatchand verify the release body contains "What's Changed" with actual PR linkschangelog.mdwill be empty, only the download table is emitted