Skip to content

Commit 0624b8f

Browse files
authored
fix(changelog): restore [Unreleased] heading on main + document the rule (#103)
After the v0.2.0 release-prep commit, `## [Unreleased]` was renamed to `## [v0.2.0] - 2026-05-13` but a fresh empty `## [Unreleased]` heading was not inserted above it. That left `main` with no Unreleased section, which breaks the `Update Unreleased Changelog` workflow that runs on every push to main: `communique generate HEAD --changelog` errors with × CHANGELOG.md exists but does not contain ## [Unreleased] or ## Unreleased; add an Unreleased section before running `communique generate HEAD --changelog`. This change: - Restores an empty `## [Unreleased]` heading above `## [v0.2.0]` in CHANGELOG.md so future post-release merges flow through the unreleased-changelog bot correctly. - Adds a new "`[Unreleased]` heading must stay on `main`" subsection to docs/RELEASE-PROCESS.md spelling out the rename-and-insert rule, noting which workflows depend on which heading, and showing the expected CHANGELOG.md shape after the release-prep commit. The next maintainer who runs `release:prep --changelog ci` should hand-edit CHANGELOG.md and amend before pushing. A future enhancement could make `release:prep` perform the rename- and-insert automatically, but that's out of scope for this fix. Change-Id: Ib0cf1999efcd7180b723960098a92e2c500463f5 Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 28665dc commit 0624b8f

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
## [Unreleased]
4+
35
## [v0.2.0] - 2026-05-13
46

57
### Added

docs/RELEASE-PROCESS.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,31 @@ communique generate "v<version>" --changelog --repo coder/agent-tty
172172

173173
and commits the resulting `CHANGELOG.md` update back to the release branch. When it pushes that bot commit, it dispatches the CI and skill-validation workflows for the updated release branch so protected-branch checks can run against the new head commit.
174174

175+
### `[Unreleased]` heading must stay on `main`
176+
177+
When preparing the release PR, **rename** the existing `## [Unreleased]` heading to `## [v<version>] - <date>` and **insert a fresh empty `## [Unreleased]` heading immediately above it** before pushing. Do not remove `[Unreleased]` outright.
178+
179+
Two workflows depend on this:
180+
181+
- `Release Changelog` (release-changelog.yml) keys off `## [v<version>]` to decide whether to run Communique on the release branch. Having `## [v<version>] - <date>` present makes the workflow skip its Communique pass and preserve the curated `[Unreleased]` content that you just renamed.
182+
- `Update Unreleased Changelog` (update-unreleased-changelog.yml) runs on every push to `main` and calls `communique generate HEAD --changelog`, which requires `## [Unreleased]` or `## Unreleased` to exist. If the heading is missing on `main`, every post-release merge fails this workflow until the heading is restored.
183+
184+
So the right CHANGELOG.md state after the release-prep commit is roughly:
185+
186+
```markdown
187+
# Changelog
188+
189+
## [Unreleased]
190+
191+
## [v<version>] - <date>
192+
193+
### Added
194+
195+
...
196+
```
197+
198+
`release:prep --changelog ci` does not edit `CHANGELOG.md` for you, so this rename + insert must be done manually (or via `release:prep --changelog local`, which lets Communique handle both steps). After running `release:prep --changelog ci`, edit `CHANGELOG.md`, then `git add CHANGELOG.md && git commit --amend --no-edit` to fold the change into the same release-prep commit.
199+
175200
### Manual prep fallback
176201

177202
If the scripted prep path is blocked, use the manual fallback only from a clean, up-to-date `main` checkout. Stage `package-lock.json` only if your checkout still has one (post-PR #91 the repo is aube-only and the file is absent):

0 commit comments

Comments
 (0)