feat: add GitHub release link to changelog finalize headings#497
Merged
c-vigo merged 5 commits intorelease/0.3.2from Apr 7, 2026
Merged
feat: add GitHub release link to changelog finalize headings#497c-vigo merged 5 commits intorelease/0.3.2from
c-vigo merged 5 commits intorelease/0.3.2from
Conversation
There was a problem hiding this comment.
Pull request overview
Adds GitHub Release tag links to finalized CHANGELOG version headings in vig-utils’ prepare-changelog tooling, making the generated release notes headings directly clickable and reducing post-release manual edits.
Changes:
- Update
finalize_release_date()to emit## [X.Y.Z](https://github.com/OWNER/REPO/releases/tag/X.Y.Z) - YYYY-MM-DD, resolvingOWNER/REPOfromGITHUB_REPOSITORYor--github-repository. - Extend
unprepareto accept linked version headings (## [semver](url) - …) for rollback workflows. - Add unit + subprocess CLI tests and update docs/CHANGELOG entries to reflect the new behavior and flag.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/vig-utils/src/vig_utils/prepare_changelog.py | Implements repo resolution/validation, linked finalize headings, and CLI flag plumbing; updates unprepare regex. |
| packages/vig-utils/tests/test_prepare_changelog.py | Adds coverage for linked headings, env vs flag behavior, validation failures, and subprocess CLI flows. |
| packages/vig-utils/README.md | Documents finalize’s new --github-repository option and the GITHUB_REPOSITORY fallback. |
| docs/RELEASE_CYCLE.md | Updates release-cycle documentation to describe linked headings and repository slug sourcing. |
| CHANGELOG.md | Adds an Unreleased entry describing the new linked-heading behavior. |
| assets/workspace/.devcontainer/CHANGELOG.md | Mirrors the root changelog entry for the workspace template. |
Comments suppressed due to low confidence (1)
packages/vig-utils/src/vig_utils/prepare_changelog.py:216
- The ValueError message still says it expects
## [semver] - …, but the matcher now also accepts## [semver](url) - …. Updating the message will make failures easier to understand when a linked heading is present.
r"^## \[(\d+\.\d+\.\d+)\](?:\([^)]+\))? - .+$",
)
if not version_heading.match(line):
raise ValueError(
f"Unexpected first CHANGELOG section heading: {line!r} "
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Description
prepare-changelog finalizenow writes version headings with a markdown link to the GitHub release tag (https://github.com/owner/repo/releases/tag/X.Y.Z). The repository slug is taken fromGITHUB_REPOSITORY(as in GitHub Actions) or from a new--github-repositoryCLI flag.unprepareaccepts linked## [semver](url) - …headings so release rollback still works.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
packages/vig-utils/src/vig_utils/prepare_changelog.py_validate_github_repository_slugand_resolve_github_repository;finalize_release_dateaccepts optionalgithub_repositoryand emits linked headings;unprepare_changelogregex allows optional(url)after the version;finalizesubcommand adds--github-repository; help text updated.packages/vig-utils/tests/test_prepare_changelog.pydocs/RELEASE_CYCLE.md,packages/vig-utils/README.mdfinalizesignature,GITHUB_REPOSITORY, and--github-repositoryexample.CHANGELOG.md,assets/workspace/.devcontainer/CHANGELOG.mdCommits (vs
release/0.3.2):test: …,feat(vigutils): …,docs: …(Refs: #496).Changelog Entry
Changed
finalize_release_datewrites## [X.Y.Z](https://github.com/owner/repo/releases/tag/X.Y.Z) - date; repository slug comes fromGITHUB_REPOSITORY(set in Actions) or fromprepare-changelog finalize ... --github-repository owner/repounpreparerecognizes linked## [semver](url) - …headingsTesting
just test)Full
just testwas not run. vig-utils only:uv run pytest packages/vig-utils/tests/test_prepare_changelog.py— 121 passed.Manual Testing Details
N/A (CLI and library behavior covered by unit and subprocess tests in
packages/vig-utils/tests/test_prepare_changelog.py).Checklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
N/A
Refs: #496