--generate-notes uses the commit graph, not semver ordering#61
Open
derekmisler wants to merge 1 commit intodocker:mainfrom
Open
--generate-notes uses the commit graph, not semver ordering#61derekmisler wants to merge 1 commit intodocker:mainfrom
derekmisler wants to merge 1 commit intodocker:mainfrom
Conversation
Contributor
Author
|
/describe |
|
✅ PR description has been generated and updated! |
There was a problem hiding this comment.
Review Summary
This PR improves the release notes generation by explicitly specifying the previous tag using --notes-start-tag. The implementation is well-structured and follows bash best practices:
✅ Correct array handling: ARGS=() declaration and "${ARGS[@]}" expansion are proper
✅ Safe conditional logic: [ -n "$PREVIOUS" ] correctly checks for non-empty values
✅ Proper quoting: Variables are quoted to prevent word splitting
✅ Fallback handling: The conditional ensures the flag is only added when a previous tag exists
No issues found. This change looks good!
Signed-off-by: Derek Misler <derek.misler@docker.com>
358962b to
745671b
Compare
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.
Summary
GitHub's
--generate-notesflag determines the range of commits to include in release notes by walking the commit graph from the new tag back to the previous reachable tag — it does not use semver ordering. This means if tags exist out of semver order in the graph, the generated notes can be incorrect or empty. This PR explicitly passes--notes-start-tagwith the previously detected tag so the release note range is always correct and predictable.Changes
.github/workflows/release.yml: Captures the previously detected tag (LATEST_TAG) as a step output (previous), then conditionally passes--notes-start-tag "$PREVIOUS"togh release createwhen a previous tag exists, ensuring release notes always cover exactly the commits since the last release.How to Test
New version: X.Y.Z (previous: vA.B.C)line to confirm the previous tag is being detected and passed through correctly.--notes-start-tagargument is omitted whenPREVIOUSis empty.