Skip to content

feat: include compare-with-previous link in release notes - #12

Merged
fiunchinho merged 1 commit into
mainfrom
add-compare-link-to-release-notes
Jun 3, 2026
Merged

feat: include compare-with-previous link in release notes#12
fiunchinho merged 1 commit into
mainfrom
add-compare-link-to-release-notes

Conversation

@fiunchinho

Copy link
Copy Markdown
Member

Summary

release-please's CHANGELOG.md headers had a "compare" link in each version line — clicking the version took you to the GitHub diff between that release and the previous one. GitHub's own auto-generated release notes use a similar idea via a **Full Changelog**: footer.

Add the equivalent to our git-cliff-generated release notes — three-line addition to the template that renders a footer line when there's a previous tag to compare against.

Diff

 {% endfor %}
 {% endfor -%}
+{% if previous.version %}
+**Full Changelog**: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/compare/{{ previous.version }}...{{ version }}
+{% endif -%}
 """

The {% if previous.version %} guard protects the very-first-release case (no previous tag → no compare link rendered).

Local verification

Re-rendered v1.3.2 with the new template:

### Fixed

- Strip squash-merge "(#N)" suffix from release-note bullets in [#11](https://...) by [@fiunchinho](...)


**Full Changelog**: https://github.com/giantswarm/test-release-please/compare/v1.3.1...v1.3.2

Test plan

  • Squash-merge this PR.
  • Confirm v1.4.0 release (this is a feat: → minor bump) body ends with **Full Changelog**: https://github.com/giantswarm/test-release-please/compare/v1.3.2...v1.4.0 and the URL is clickable.

Matches the format GitHub's auto-generated release notes use (and what
release-please wrote into CHANGELOG.md headers): a "**Full Changelog**:"
footer line at the bottom of each release body, linking to the
GitHub compare view between the previous release tag and this one.

Guarded by `{% if previous.version %}` so the first release (which has
no previous tag) doesn't render a broken compare link.

Verified locally by re-rendering v1.3.2 against the new template — the
footer reads "Full Changelog: .../compare/v1.3.1...v1.3.2".
@fiunchinho fiunchinho self-assigned this Jun 3, 2026
@fiunchinho
fiunchinho merged commit 54d939c into main Jun 3, 2026
1 check passed
@fiunchinho
fiunchinho deleted the add-compare-link-to-release-notes branch June 3, 2026 13:17
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.

1 participant