Skip to content

changelog: adopt changie fragment files to end CHANGELOG merge conflicts#230

Draft
iainmcgin wants to merge 2 commits into
mainfrom
iain/changie-spike
Draft

changelog: adopt changie fragment files to end CHANGELOG merge conflicts#230
iainmcgin wants to merge 2 commits into
mainfrom
iain/changie-spike

Conversation

@iainmcgin

Copy link
Copy Markdown
Collaborator

Why

Every PR that adds an entry to the top of [Unreleased] in CHANGELOG.md conflicts with every other open PR doing the same, so the merge queue turns into a sequence of manual changelog rebases. This switches to changie's fragment model: each PR adds a new file under .changes/unreleased/, and CHANGELOG.md is assembled from .changes/ at release time. New file → no shared lines → no conflict.

What

Two commits, intended to be reviewed separately:

  1. Tooling.changie.yaml (tuned to our exact Keep a Changelog format: bracketed [X.Y.Z], - bullets, multi-line bodies with hanging indent, auto-generated [ver]: …compare/… link via {{.PreviousVersion}}), task install-changie / changelog-new / changelog-batch / changelog-merge, a check-changelog CI job (same pattern as check-generated-code), and a CONTRIBUTING.md section.
  2. Migration — released history 0.1.00.7.1 split into .changes/<ver>.md verbatim (each now self-contained with its own compare-link def); the 24 current [Unreleased] entries split into .changes/unreleased/*.yaml; CHANGELOG.md regenerated. Released body round-trips byte-identical.

Contributor workflow change

Instead of editing CHANGELOG.md:

task changelog-new          # prompts for kind + body, writes .changes/unreleased/<Kind>-<ts>.yaml

CI fails any PR whose CHANGELOG.md diverges from changie merge output.

Release workflow change

task changelog-batch -- 0.8.0   # fragments → .changes/0.8.0.md (edit to add release prose if wanted)
task changelog-merge            # regenerate CHANGELOG.md

Sequencing

Open PRs that currently edit CHANGELOG.md will fail check-changelog once this lands; each needs its entry moved to a fragment (one last time). If preferred, this can land immediately after the 0.8.0 cut so the migration carries zero unreleased fragments.

PRs that each add an entry to the top of [Unreleased] in CHANGELOG.md
conflict with one another on every merge. This switches to changie's
fragment model: each change adds a new file under .changes/unreleased/,
and CHANGELOG.md is assembled from .changes/ at release time.

- .changie.yaml tuned to the existing Keep a Changelog format
  (bracketed [X.Y.Z] headings, hyphen bullets, multi-line bodies with
  hanging indent, per-version compare-link footer via PreviousVersion).
- Taskfile: install-changie / changelog-new / changelog-batch /
  changelog-merge. install-protoc no longer wipes all of .local/bin.
- CI: check-changelog job verifies CHANGELOG.md == changie merge,
  same enforcement pattern as check-generated-code.
- CONTRIBUTING.md: Changelog Entries section.

The history migration is in the next commit.
Mechanical relocation, no content edits:

- Released sections 0.1.0..0.7.1 split into .changes/<ver>.md verbatim,
  each carrying its own [ver]: compare-link reference definition (so
  changie batch can emit the same shape for new versions automatically).
- 24 current Unreleased entries split into .changes/unreleased/*.yaml
  fragments.
- CHANGELOG.md regenerated via changie merge. The released body is
  byte-identical; the [Unreleased] section is gone (its entries now live
  as fragments) and the header gains a do-not-edit pointer to
  .changes/unreleased/.
@github-actions

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant