release: link the CHANGELOG to the Forgejo repository and gate it #448

Closed
natsukium wants to merge 3 commits from release/changelog-forgejo-links into main
Owner

Closes #393.

The CHANGELOG link references pointed at the GitHub mirror, which receives tags but no releases, so a release link could land on a bare tag with nothing to download. They now point at the public Forgejo repository, https://git.natsukium.com/felis-terminal/felis, where the repository is about to be uploaded. Until then, the links return 404.

tools/release/verify.py now gates a final tag vX.Y.Z on two exact lines in CHANGELOG.md:

  • [unreleased]: https://git.natsukium.com/felis-terminal/felis/compare/vX.Y.Z...HEAD
  • [X.Y.Z]: https://git.natsukium.com/felis-terminal/felis/releases/tag/vX.Y.Z

Release candidates are exempt, as they already are for the dated section. The check matches whole lines and does not resolve link references the way Markdown does. Earlier drafts tried to match Markdown's resolution rules, and each draft ran into another edge case. A spelling that Markdown treats as equivalent, such as [Unreleased]:, fails the gate on purpose. docs/reference/workspace.md item 5 states the exact lines.

Checks: python3 tools/release/verify.py --self-test and just check pass. A sol review of the final form passed.

Closes #393. The CHANGELOG link references pointed at the GitHub mirror, which receives tags but no releases, so a release link could land on a bare tag with nothing to download. They now point at the public Forgejo repository, `https://git.natsukium.com/felis-terminal/felis`, where the repository is about to be uploaded. Until then, the links return 404. `tools/release/verify.py` now gates a final tag vX.Y.Z on two exact lines in `CHANGELOG.md`: - `[unreleased]: https://git.natsukium.com/felis-terminal/felis/compare/vX.Y.Z...HEAD` - `[X.Y.Z]: https://git.natsukium.com/felis-terminal/felis/releases/tag/vX.Y.Z` Release candidates are exempt, as they already are for the dated section. The check matches whole lines and does not resolve link references the way Markdown does. Earlier drafts tried to match Markdown's resolution rules, and each draft ran into another edge case. A spelling that Markdown treats as equivalent, such as `[Unreleased]:`, fails the gate on purpose. `docs/reference/workspace.md` item 5 states the exact lines. Checks: `python3 tools/release/verify.py --self-test` and `just check` pass. A sol review of the final form passed.
The changelog's link references pointed at the GitHub mirror's
releases/tag and compare pages, but the release assets are published by
the Forgejo release workflow and the install how-to sends readers to the
Forgejo release page. The mirror receives tags without releases, so a
GitHub release link can land on a bare tag with nothing to download.

The references now target the public Forgejo repository at
git.natsukium.com/felis-terminal/felis, and the release gate requires
both lines verbatim on a final tag: the version's releases/tag page and
Unreleased comparing from that tag to HEAD. A release cut with a stale
or mirrored link fails before anything is published. Candidates stay
exempt, as they are for the dated section.

The check is an exact-line match rather than a Markdown link-reference
resolver. Resolving references the way Markdown does (label folding,
titles, angle brackets, fences, comments, paragraph continuation) kept
surfacing edge cases, and each fix grew the gate toward a parser. The
release author writes these two lines by hand, so requiring one spelling
costs nothing, and a differently spelled line failing is intended.

Closes #393.

Assisted-by: Claude Code
release: test the candidate exemption against a changelog that owes nothing
Some checks failed
darwin / detect relevant changes (pull_request) Successful in 13s
darwin / darwin docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 53s
darwin / publish felis (aarch64-darwin) (pull_request) Has been skipped
pr / nix flake check (pull_request) Successful in 29s
pr / cargo build / clippy / test / deny (pull_request) Successful in 1m51s
pr / wire schema is compatible with the base (pull_request) Successful in 15s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 16s
pr / publish felis (x86_64-linux) (pull_request) Has been skipped
windows / cargo clippy (Windows cross) (pull_request) Successful in 13s
windows / detect relevant changes (pull_request) Successful in 12s
windows / windows docs-only no-op (pull_request) Has been skipped
windows / cargo nextest (Windows) (pull_request) Has been cancelled
windows / frontend smoke (Windows) (pull_request) Has been cancelled
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been cancelled
61d8d8f624
The existing candidate case ran against a changelog that already had the
dated section and both link lines, so it would still pass if the gate
stopped exempting candidates. The new case tags a candidate whose
changelog has only Unreleased, which the exemption alone lets through.

Assisted-by: Claude Code
Author
Owner

Not needed: published links, including the CHANGELOG release links, stay on the GitHub mirror (github.com/felis-terminal/felis) for stability.

Not needed: published links, including the CHANGELOG release links, stay on the GitHub mirror (github.com/felis-terminal/felis) for stability.
natsukium closed this pull request 2026-09-25 13:10:48 +09:00
Commenting is not possible because the repository is archived.
No description provided.