Skip to content

--generate-notes uses the commit graph, not semver ordering#61

Merged
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:release-notes-were-using-the-commit-graph-not-sem
Mar 3, 2026
Merged

--generate-notes uses the commit graph, not semver ordering#61
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:release-notes-were-using-the-commit-graph-not-sem

Conversation

@derekmisler
Copy link
Contributor

@derekmisler derekmisler commented Feb 27, 2026

Summary

GitHub's --generate-notes flag 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-tag with 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" to gh release create when a previous tag exists, ensuring release notes always cover exactly the commits since the last release.

How to Test

  • Trigger the release workflow and verify the generated GitHub Release notes contain only commits made since the previous tag, not a broader or empty set.
  • Check the workflow logs for the updated New version: X.Y.Z (previous: vA.B.C) line to confirm the previous tag is being detected and passed through correctly.
  • For a first-ever release (no previous tag), confirm the workflow still succeeds — the --notes-start-tag argument is omitted when PREVIOUS is empty.

@derekmisler
Copy link
Contributor Author

/describe

@derekmisler derekmisler marked this pull request as ready for review February 27, 2026 16:11
@derekmisler derekmisler requested a review from a team as a code owner February 27, 2026 16:11
@docker-agent
Copy link
Contributor

docker-agent bot commented Feb 27, 2026

✅ PR description has been generated and updated!

docker-agent[bot]
docker-agent bot previously approved these changes Feb 27, 2026
Copy link
Contributor

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

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

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!

@derekmisler derekmisler self-assigned this Feb 27, 2026
@derekmisler derekmisler force-pushed the release-notes-were-using-the-commit-graph-not-sem branch from 358962b to 745671b Compare February 27, 2026 21:33
@derekmisler derekmisler force-pushed the release-notes-were-using-the-commit-graph-not-sem branch from 745671b to e8affa4 Compare March 3, 2026 13:55
derekmisler added a commit to derekmisler/cagent-action that referenced this pull request Mar 3, 2026
)

Prevents the bot from granting merge authority on repos without
branch protection rules, which was allowing PRs to be merged
without human review.
derekmisler added a commit to derekmisler/cagent-action that referenced this pull request Mar 3, 2026
)

Prevents the bot from granting merge authority on repos without
branch protection rules, which was allowing PRs to be merged
without human review.
derekmisler added a commit to derekmisler/cagent-action that referenced this pull request Mar 3, 2026
)

Signed-off-by: Derek Misler <derek.misler@docker.com>
derekmisler added a commit to derekmisler/cagent-action that referenced this pull request Mar 3, 2026
)

Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler force-pushed the release-notes-were-using-the-commit-graph-not-sem branch from e8affa4 to c8a943e Compare March 3, 2026 14:34
@derekmisler derekmisler enabled auto-merge (squash) March 3, 2026 14:35
Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler force-pushed the release-notes-were-using-the-commit-graph-not-sem branch from c8a943e to 9b04200 Compare March 3, 2026 14:55
jobs:
review:
if: github.event.issue.pull_request && contains(github.event.comment.body, '/review')
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/review')

Choose a reason for hiding this comment

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

honestly this was kinda nice, but not sure if it was problematic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, the /help command in Pinata listed all the commands available, which included the review command, and it was running reviews that would fail because they were triggered by bots without an author association. and then every time i would explain that to someone in a PR, I would inevitably include that review command in my explanation, which triggered another review

@derekmisler derekmisler merged commit 497a354 into docker:main Mar 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants