fix(ops-release): stop prepending an empty "### Changed" to --notes - #950
Merged
Aurora Capital (auroracapital) merged 4 commits intoSep 9, 2026
Merged
Conversation
Notes passed with --notes often already carry their own "### Fixed" or "### Added" heading. The old code added "### Changed" unconditionally on that path, so the generated GitHub release notes opened with an empty section. Only add the heading when the body has none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Lifts the heading block out of bin/ops-release and exercises it directly, so the test cannot drift away from the shipped code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Aurora Capital (auroracapital)
deleted the
fix/ops-release-changelog-heading
branch
September 9, 2026 13:14
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.
Wat er stuk was
ops-release --notes "$BODY"prepended### Changedto the CHANGELOG section unconditionally. Notes written by hand usually carry their own heading, so v3.10.10 was cut with:The GitHub release workflow awk-parses that section verbatim, so the published release notes opened with an empty
### Changed. It had to be patched on the release branch by hand before the merge.De fix
claude-ops/bin/ops-releasenow checks whether the body already starts a### Added|Changed|Fixed|Removedsection and only adds the heading when it does not. This mirrors the test the AI path already applies to its own output one branch above. Written as anifblock rather thancmd && var=1because the script runs underset -euo pipefail.Test
claude-ops/tests/test-ops-release-changelog-heading.shlifts the heading block straight out ofbin/ops-releasewithawkand evaluates it, so the test cannot drift away from the shipped code. Five cases: own### Fixeduntouched, own### Addeduntouched, bare bullets still get a heading, the AI path unchanged, version header first.Verified both ways:
v3.10.10— fails at "heading guard block not found", exit 1Registered in
tests/run-all.sh.🤖 Generated with Claude Code