feat: add changelog heading links for unreleased and releases
Some checks failed
Push Validation / validate (push) Failing after 42s
Some checks failed
Push Validation / validate (push) Failing after 42s
- Link Unreleased heading to repository main branch. - Link release headings to release tag pages. - Derive repository URL from CI metadata or origin git remote. - Keep plain headings when repository URL cannot be resolved. - Update tests and README usage docs for linked heading behavior.
This commit is contained in:
@@ -162,6 +162,13 @@ Defaults:
|
||||
|
||||
When no `--version-file` flag is provided, `vociferate` derives the current version from the most recent released section heading in the changelog (`## [x.y.z] - ...`). If no prior releases exist, it defaults to `0.0.0` and recommends `v1.0.0` as the first tag.
|
||||
|
||||
During prepare, vociferate also normalizes changelog heading links when it can determine the repository URL (from CI environment variables or `origin` git remote):
|
||||
|
||||
- `## [Unreleased]` becomes a link to the repository main branch.
|
||||
- `## [x.y.z] - YYYY-MM-DD` becomes a link to the corresponding release page.
|
||||
|
||||
If the repository URL cannot be determined, headings remain in plain form.
|
||||
|
||||
When running `--version`, the `release-version` file is created automatically if it does not exist, so new repositories do not need to pre-seed it.
|
||||
|
||||
Repositories that keep the version inside source code should pass explicit `--version-file` and `--version-pattern` values; in that case the version file is used directly instead of the changelog.
|
||||
|
||||
Reference in New Issue
Block a user