fix: generate release notes ourselves for hotfix releases - #5127
Open
Siumauricio wants to merge 1 commit into
Open
fix: generate release notes ourselves for hotfix releases#5127Siumauricio wants to merge 1 commit into
Siumauricio wants to merge 1 commit into
Conversation
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.
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" |
Contributor
There was a problem hiding this comment.
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 |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hotfixes land on
mainviagit cherry-pick(hotfix-cherry-pick.yml), not a PR merged intomain. GitHub'sgenerate_release_notes: truebuilds 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-releasenow builds the "What's Changed" list itself: it walks theMerge pull request #N ...commit messages between the previous tag andHEAD(these survive the cherry-pick sincehotfix-cherry-pick.ymlpreserves the original commit message) and resolves each PR's title/author withgh pr view.Needs the
hotfixlabel so it reachesmainbefore the next release, sincegenerate-releaseonly 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.
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