Description
The finalize_release_date function in prepare_changelog.py currently replaces ## [X.Y.Z] - TBD with ## [X.Y.Z] - YYYY-MM-DD, but does not add a link to the GitHub Release tag. The link has been added manually in separate post-release commits for every past release (e.g. 7acaab4 for 0.3.1, 0217d7d for 0.3.0).
Problem Statement
Every release requires a manual follow-up commit to transform ## [X.Y.Z] - DATE into ## [X.Y.Z](https://github.com/vig-os/devcontainer/releases/tag/X.Y.Z) - DATE. This is easy to forget and adds unnecessary toil.
Proposed Solution
Update finalize_release_date() in packages/vig-utils/src/vig_utils/prepare_changelog.py to produce the replacement string with the release tag URL:
replacement = f"## [{version}](https://github.com/{repo}/releases/tag/{version}) - {release_date}"
The repo URL should be derived from a parameter or environment variable (e.g. GITHUB_REPOSITORY) rather than hardcoded, so the same tool works for downstream workspaces.
Alternatives Considered
- Add the link in a separate post-finalize step in
release.yml using sed. This keeps prepare_changelog.py simpler but scatters changelog logic across shell and Python.
- Add the link during
promote-release. The tag exists by then, but it delays the link until after the release is already published as draft.
Impact
- No breaking change. The only difference is the heading format in CHANGELOG.md gaining a link.
- Benefits every release going forward by eliminating a manual step.
- The downstream workspace
prepare_changelog would also benefit if the same change is applied to the workspace template.
Changelog Category
Changed
Acceptance Criteria
Description
The
finalize_release_datefunction inprepare_changelog.pycurrently replaces## [X.Y.Z] - TBDwith## [X.Y.Z] - YYYY-MM-DD, but does not add a link to the GitHub Release tag. The link has been added manually in separate post-release commits for every past release (e.g.7acaab4for 0.3.1,0217d7dfor 0.3.0).Problem Statement
Every release requires a manual follow-up commit to transform
## [X.Y.Z] - DATEinto## [X.Y.Z](https://github.com/vig-os/devcontainer/releases/tag/X.Y.Z) - DATE. This is easy to forget and adds unnecessary toil.Proposed Solution
Update
finalize_release_date()inpackages/vig-utils/src/vig_utils/prepare_changelog.pyto produce the replacement string with the release tag URL:The repo URL should be derived from a parameter or environment variable (e.g.
GITHUB_REPOSITORY) rather than hardcoded, so the same tool works for downstream workspaces.Alternatives Considered
release.ymlusingsed. This keepsprepare_changelog.pysimpler but scatters changelog logic across shell and Python.promote-release. The tag exists by then, but it delays the link until after the release is already published as draft.Impact
prepare_changelogwould also benefit if the same change is applied to the workspace template.Changelog Category
Changed
Acceptance Criteria
finalize_release_date()produces headings with the release tag URL.cursor/rules/tdd.mdc)