Skip to content

fix: generate release notes ourselves for hotfix releases - #5127

Open
Siumauricio wants to merge 1 commit into
canaryfrom
fix/hotfix-release-notes-generation
Open

fix: generate release notes ourselves for hotfix releases#5127
Siumauricio wants to merge 1 commit into
canaryfrom
fix/hotfix-release-notes-generation

Conversation

@Siumauricio

@Siumauricio Siumauricio commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Hotfixes land on main via git cherry-pick (hotfix-cherry-pick.yml), not a PR merged into main. GitHub's generate_release_notes: true builds its changelog by associating merged PRs with the target branch, so cherry-picked commits (new SHAs, no merge-into-main event) never match anything and the release body comes back empty — this is what happened on v0.30.1.

Instead of relying on that, generate-release now builds the "What's Changed" list itself: it walks the Merge pull request #N ... commit messages between the previous tag and HEAD (these survive the cherry-pick since hotfix-cherry-pick.yml preserves the original commit message) and resolves each PR's title/author with gh pr view.

Needs the hotfix label so it reaches main before the next release, since generate-release only runs there.

Greptile Summary

This PR replaces GitHub-generated release notes with a workflow step that extracts pull-request numbers from merge commit subjects and resolves their metadata through GitHub CLI.

  • Builds a “What's Changed” list over commits since the nearest tag.
  • Adds a full-changelog comparison link.
  • Supplies the generated Markdown file to the release action instead of enabling automatic notes.

Confidence Score: 3/5

The release workflow should not merge until retries preserve the correct comparison range and pull-request lookup failures can no longer silently publish incomplete notes.

A rerun after tag creation can overwrite the release body using an empty self-range, and suppressed GitHub CLI failures allow partially generated notes to be published successfully.

Files Needing Attention: .github/workflows/dokploy.yml

Reviews (1): Last reviewed commit: "fix: generate release notes ourselves fo..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Hotfixes land on main via git cherry-pick (hotfix-cherry-pick.yml),
not a PR merged into main, so GitHub's generate_release_notes can't
associate any PR with those commits and the release body comes back
empty (see v0.30.1).

Build the "What's Changed" list from the cherry-picked
"Merge pull request #N ..." commit messages instead, resolving each
PR's title/author via gh.
@Siumauricio Siumauricio added the hotfix Cherry-pick this fix to main for next patch release label Aug 18, 2026
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 18, 2026
Comment on lines +174 to +176
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
RANGE="HEAD"
[ -n "$PREV_TAG" ] && RANGE="${PREV_TAG}..HEAD"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Current tag empties retry range

When this workflow is rerun after the release tag was created, git describe selects that current tag and constructs an empty <current-tag>..HEAD range, causing the existing release notes to be replaced with an empty “What's Changed” section and a self-comparison link.

Comment on lines +183 to +186
| while read -r PR; do
gh pr view "$PR" --repo "${{ github.repository }}" \
--json title,author -q '"* \(.title) by @\(.author.login) in #'"$PR"'"' \
2>/dev/null || true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Lookup failures silently drop changes

When any gh pr view call fails because of an API, authentication, rate-limit, or network error, 2>/dev/null || true silently omits that PR and the unchecked file is still published, causing the public release notes to be incomplete while the workflow reports success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotfix Cherry-pick this fix to main for next patch release size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant