fix(scripts): vendor consolidated generate-changelog.py#48
Merged
Conversation
Replaces the standalone 329-line bash script with the consolidated Python version from `brettdavies/agent-skills` (`rust-tool-release` skill). Same flag surface: `[--tag vX.Y.Z] [repo-path]`, `--check`, `--dry-run`. The dry-run idempotency check and duplicate-section guard moved into the upstream Python so the swap preserves behavior. Doc refs updated in `RELEASES.md`, `RELEASES-RATIONALE.md`, `cliff.toml` pipeline comment, the `publish.yml` workflow comment, and three planning docs. Historical `CHANGELOG.md` mention of the old name is intentionally left in place.
This was referenced Jun 5, 2026
brettdavies
added a commit
to brettdavies/bird
that referenced
this pull request
Jun 5, 2026
…te-section guard (#74) ## Summary Refreshes the vendored `scripts/generate-changelog.py` to match [`brettdavies/agent-skills#16`](brettdavies/agent-skills#16), which added `--dry-run` and a duplicate-section guard. Bird's copy predated the merge, so it was lagging the upstream `rust-tool-release` skill by one feature plus one bug fix. This PR closes that gap and keeps the fleet aligned: bird, xurl-rs, agentnative-cli, agentnative-skill, and agentnative-spec all run the same script. `--dry-run` runs the regen pipeline against the current `CHANGELOG.md` in place, restores the original on exit, and exits 0 on idempotent output or 1 with a unified diff on drift. The duplicate-section guard short-circuits the git-cliff prepend when a `## [X.Y.Z]` heading for the requested tag already exists (in normal mode it prints a one-line note and exits 0; in dry-run it skips the prepend but still runs PR-body expansion so the comparison stays meaningful). The prior behavior of silently appending a second copy of the same section was a defect. It was not a workflow anyone depended on. No other files touched. `RELEASES.md` and `RELEASES-RATIONALE.md` already named `generate-changelog.py` as the entry point. ## Changelog ### Added - `scripts/generate-changelog.py --dry-run` idempotency check that runs the regen pipeline against `CHANGELOG.md`, compares against the current file, restores the original on exit, and exits 1 with a unified diff if regeneration would drift. ### Fixed - `scripts/generate-changelog.py` no longer prepends a duplicate `## [X.Y.Z]` section when one already exists for the requested tag. ## Type of Change - [x] `feat`: New feature (non-breaking change which adds functionality) - [x] `fix`: Bug fix (non-breaking change which fixes an issue) ## Related Issues/Stories - Story: n/a - Issue: n/a - Architecture: keeps the vendored copy aligned with the upstream `rust-tool-release` skill (PR `brettdavies/agent-skills#16`). - Related PRs: [brettdavies/agent-skills#16](brettdavies/agent-skills#16), [brettdavies/agentnative-cli#85](brettdavies/agentnative-cli#85), [brettdavies/agentnative-skill#31](brettdavies/agentnative-skill#31), [brettdavies/agentnative#48](brettdavies/agentnative#48). ## Files Modified **Modified:** - `scripts/generate-changelog.py`: re-vendored from `brettdavies/agent-skills/rust-tool-release/scripts/generate-changelog.py`. **Created, Renamed, Deleted:** - None. ## Testing - [x] `./scripts/generate-changelog.py --help` reflects `--check`, `--dry-run`, `--tag`. - [x] `./scripts/generate-changelog.py --dry-run --tag v0.1.3` (section exists in `CHANGELOG.md`): exits 0 with "no regen drift"; original `CHANGELOG.md` hash unchanged. - [x] `./scripts/generate-changelog.py --dry-run --tag v0.2.0` (section not in dev's `CHANGELOG.md`; only on `main`): exits 1 with a unified diff showing the would-be regeneration; original hash unchanged. Drift is the correct behavior here because dev's CHANGELOG legitimately doesn't carry the `[0.2.0]` heading yet. **Test Summary:** - No Rust source changed. CI re-runs cargo gates on push regardless. ## Breaking Changes - [x] No breaking changes Flag surface (`--check`, `--tag`, positional repo path) preserved. New `--dry-run` flag is additive. The duplicate-section guard is a behavior change in normal mode that prevents a silent defect. ## Deployment Notes - [x] No special deployment steps required ## Checklist - [x] Conventional Commits - [x] Self-review completed - [x] No new warnings or errors - [x] Backward compatible
10 tasks
brettdavies
added a commit
to brettdavies/dotfiles
that referenced
this pull request
Jun 5, 2026
## Summary Updates the global PR template's `## Changelog` section comment to name `generate-changelog.py` instead of the retired `generate-changelog.sh` bash wrapper. Repos without their own `.github/pull_request_template.md` fall back to this file, so the comment is the first thing a contributor in a fresh brettdavies repo sees when opening a PR. The fleet (bird, xurl-rs, agentnative-cli, agentnative-skill, agentnative-spec) all ship the consolidated Python entry point now, vendored from the `rust-tool-release` skill. ## Changelog ### Documentation - Global PR template comment under `## Changelog` names `generate-changelog.py` as the script that parses the categorized bullets at release time. ## Type of Change - [x] `docs`: Documentation update ## Related Issues/Stories - Story: n/a - Issue: n/a - Architecture: catches up the global fallback template after `brettdavies/agent-skills#16` retired the bash wrapper upstream. - Related PRs: [brettdavies/agent-skills#16](brettdavies/agent-skills#16), [brettdavies/agentnative-cli#85](brettdavies/agentnative-cli#85), [brettdavies/agentnative-skill#31](brettdavies/agentnative-skill#31), [brettdavies/agentnative#48](brettdavies/agentnative#48). ## Files Modified **Modified:** - `stow/github/dot-config/github/pull_request_template.md`: one-word rename in the `## Changelog` comment. **Created, Renamed, Deleted:** - None. ## Testing - [x] Local stow target (`~/.config/github/pull_request_template.md`) reflects the rename via the existing symlink. ## Breaking Changes - [x] No breaking changes Comment text only; no behavior change. ## Deployment Notes - [x] No special deployment steps required `stow` re-applies the symlink target on next sync; no fresh `stow` invocation required since the file is already linked. ## Checklist - [x] Conventional Commits - [x] Self-review completed - [x] No new warnings or errors - [x] Backward compatible
brettdavies
added a commit
to brettdavies/xurl-rs
that referenced
this pull request
Jun 5, 2026
…te-section guard (#57) ## Summary Refreshes the vendored `scripts/generate-changelog.py` to match [`brettdavies/agent-skills#16`](brettdavies/agent-skills#16), which added `--dry-run` and a duplicate-section guard. xurl-rs's copy predated the merge by a few hours and was lagging the upstream `rust-tool-release` skill by one feature plus one bug fix. This PR closes that gap and keeps the fleet aligned: bird, xurl-rs, agentnative-cli, agentnative-skill, and agentnative-spec all run the same script. `--dry-run` runs the regen pipeline against the current `CHANGELOG.md` in place, restores the original on exit, and exits 0 on idempotent output or 1 with a unified diff on drift. The duplicate-section guard short-circuits the git-cliff prepend when a `## [X.Y.Z]` heading for the requested tag already exists (in normal mode it prints a one-line note and exits 0; in dry-run it skips the prepend but still runs PR-body expansion so the comparison stays meaningful). The prior behavior of silently appending a second copy of the same section was a defect, not a workflow anyone depended on. No other files touched. `RELEASES.md`, `RELEASES-RATIONALE.md`, and the PR template already named `generate-changelog.py` after PR #55 landed. ## Changelog ### Added - `scripts/generate-changelog.py --dry-run` idempotency check that runs the regen pipeline against `CHANGELOG.md`, compares against the current file, restores the original on exit, and exits 1 with a unified diff if regeneration would drift. ### Fixed - `scripts/generate-changelog.py` no longer prepends a duplicate `## [X.Y.Z]` section when one already exists for the requested tag. ## Type of Change - [x] `feat`: New feature (non-breaking change which adds functionality) - [x] `fix`: Bug fix (non-breaking change which fixes an issue) ## Related Issues/Stories - Story: n/a - Issue: n/a - Architecture: keeps the vendored copy aligned with the upstream `rust-tool-release` skill (PR `brettdavies/agent-skills#16`). - Related PRs: [brettdavies/agent-skills#16](brettdavies/agent-skills#16), [brettdavies/bird#74](brettdavies/bird#74), [brettdavies/agentnative-cli#85](brettdavies/agentnative-cli#85), [brettdavies/agentnative-skill#31](brettdavies/agentnative-skill#31), [brettdavies/agentnative#48](brettdavies/agentnative#48). ## Files Modified **Modified:** - `scripts/generate-changelog.py`: re-vendored from `brettdavies/agent-skills/rust-tool-release/scripts/generate-changelog.py`. **Created, Renamed, Deleted:** - None. ## Testing - [x] `./scripts/generate-changelog.py --help` reflects `--check`, `--dry-run`, `--tag`. - [x] `./scripts/generate-changelog.py --dry-run --tag v1.2.0` (most recent section in `CHANGELOG.md`): exits 0 with "no regen drift"; original `CHANGELOG.md` hash unchanged. **Test Summary:** - No Rust source changed. CI re-runs cargo gates on push regardless. ## Breaking Changes - [x] No breaking changes Flag surface (`--check`, `--tag`, positional repo path) preserved. New `--dry-run` flag is additive. The duplicate-section guard is a behavior change in normal mode that prevents a silent defect. ## Deployment Notes - [x] No special deployment steps required ## Checklist - [x] Conventional Commits - [x] Self-review completed - [x] No new warnings or errors - [x] Backward compatible
brettdavies
added a commit
to brettdavies/xurl-rs
that referenced
this pull request
Jun 5, 2026
…te-section guard (#57) ## Summary Refreshes the vendored `scripts/generate-changelog.py` to match [`brettdavies/agent-skills#16`](brettdavies/agent-skills#16), which added `--dry-run` and a duplicate-section guard. xurl-rs's copy predated the merge by a few hours and was lagging the upstream `rust-tool-release` skill by one feature plus one bug fix. This PR closes that gap and keeps the fleet aligned: bird, xurl-rs, agentnative-cli, agentnative-skill, and agentnative-spec all run the same script. `--dry-run` runs the regen pipeline against the current `CHANGELOG.md` in place, restores the original on exit, and exits 0 on idempotent output or 1 with a unified diff on drift. The duplicate-section guard short-circuits the git-cliff prepend when a `## [X.Y.Z]` heading for the requested tag already exists (in normal mode it prints a one-line note and exits 0; in dry-run it skips the prepend but still runs PR-body expansion so the comparison stays meaningful). The prior behavior of silently appending a second copy of the same section was a defect, not a workflow anyone depended on. No other files touched. `RELEASES.md`, `RELEASES-RATIONALE.md`, and the PR template already named `generate-changelog.py` after PR #55 landed. ## Changelog ### Added - `scripts/generate-changelog.py --dry-run` idempotency check that runs the regen pipeline against `CHANGELOG.md`, compares against the current file, restores the original on exit, and exits 1 with a unified diff if regeneration would drift. ### Fixed - `scripts/generate-changelog.py` no longer prepends a duplicate `## [X.Y.Z]` section when one already exists for the requested tag. ## Type of Change - [x] `feat`: New feature (non-breaking change which adds functionality) - [x] `fix`: Bug fix (non-breaking change which fixes an issue) ## Related Issues/Stories - Story: n/a - Issue: n/a - Architecture: keeps the vendored copy aligned with the upstream `rust-tool-release` skill (PR `brettdavies/agent-skills#16`). - Related PRs: [brettdavies/agent-skills#16](brettdavies/agent-skills#16), [brettdavies/bird#74](brettdavies/bird#74), [brettdavies/agentnative-cli#85](brettdavies/agentnative-cli#85), [brettdavies/agentnative-skill#31](brettdavies/agentnative-skill#31), [brettdavies/agentnative#48](brettdavies/agentnative#48). ## Files Modified **Modified:** - `scripts/generate-changelog.py`: re-vendored from `brettdavies/agent-skills/rust-tool-release/scripts/generate-changelog.py`. **Created, Renamed, Deleted:** - None. ## Testing - [x] `./scripts/generate-changelog.py --help` reflects `--check`, `--dry-run`, `--tag`. - [x] `./scripts/generate-changelog.py --dry-run --tag v1.2.0` (most recent section in `CHANGELOG.md`): exits 0 with "no regen drift"; original `CHANGELOG.md` hash unchanged. **Test Summary:** - No Rust source changed. CI re-runs cargo gates on push regardless. ## Breaking Changes - [x] No breaking changes Flag surface (`--check`, `--tag`, positional repo path) preserved. New `--dry-run` flag is additive. The duplicate-section guard is a behavior change in normal mode that prevents a silent defect. ## Deployment Notes - [x] No special deployment steps required ## Checklist - [x] Conventional Commits - [x] Self-review completed - [x] No new warnings or errors - [x] Backward compatible
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.
Summary
Replaces the standalone 329-line bash
scripts/generate-changelog.shwith the consolidatedscripts/generate-changelog.pyvendored from therust-tool-releaseskill inbrettdavies/agent-skills. The Python version exposes the same flags ([--tag vX.Y.Z] [repo-path],--check,--dry-run) and the duplicate-section guard.Brings this repo onto the same generator as
bird,xurl-rs, and (in parallel PRs)agentnative-cliandagentnative-skill.Doc references updated in
RELEASES.md,RELEASES-RATIONALE.md, thecliff.tomlpipeline comment, thepublish.ymlworkflow comment, and three planning docs. HistoricalCHANGELOG.mdmention of the old name is intentionally left in place.Changelog
Changed
scripts/generate-changelog.py(consolidated Python) replacesscripts/generate-changelog.sh. Same flags(
[--tag vX.Y.Z],--check,--dry-run), same git-cliff + PR-body pipeline, plus duplicate-section guard.Documentation
cliff.toml/publish.ymlcomments namegenerate-changelog.pyas the entry point.Type of Change
fix: Bug fix (non-breaking change which fixes an issue)refactor: Code refactoring (no functional changes)Related Issues/Stories
--dry-runand the duplicate-section guard to the upstream Python so the swap preserves parity.Files Modified
Modified:
.github/workflows/publish.yml: comment names the new script.RELEASES.md,RELEASES-RATIONALE.md: invocation references.cliff.toml: pipeline comment names the new script.docs/plans/2026-04-22-003-release-infra-and-v0.2.0-cut-plan.mddocs/plans/2026-04-27-001-refactor-three-repo-naming-alignment-plan.mddocs/plans/2026-06-01-001-feat-p0-mirror-skill-pr25-changelog-dry-run-plan.mdCreated:
scripts/generate-changelog.py: vendored frombrettdavies/agent-skills/rust-tool-release/scripts/generate-changelog.py.Renamed:
Deleted:
scripts/generate-changelog.sh.Testing
./scripts/generate-changelog.py --helpreflects--check,--dry-run,--tag.publish.ymlcomment exist in this repo.Test Summary:
Breaking Changes
Flag surface unchanged from the bash script.
Deployment Notes
Land this PR after brettdavies/agent-skills#16 so the vendored copy reflects upstream skill state.
Checklist