Skip to content

fix(release): preserve aqua-registry sections in changelog across releases#8047

Merged
jdx merged 1 commit intomainfrom
fix/changelog-preserve-aqua-sections
Feb 7, 2026
Merged

fix(release): preserve aqua-registry sections in changelog across releases#8047
jdx merged 1 commit intomainfrom
fix/changelog-preserve-aqua-sections

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Feb 7, 2026

Summary

  • git cliff -o was regenerating the entire CHANGELOG.md from git history, which wiped out previously injected aqua-registry sections from older releases (since those sections come from the AWK injection, not git commits)
  • Switched to git cliff --unreleased --prepend to only add the new release entry while preserving all existing content
  • Fixed missing blank line separators between injected aqua sections and adjacent release headers (bash $() strips trailing newlines, so AWK's print alone wasn't enough)

Test plan

  • Verify next release preserves aqua-registry sections from previous releases in CHANGELOG.md
  • Verify blank line formatting between aqua section and next release header

🤖 Generated with Claude Code


Note

Low Risk
Small change to release automation affecting changelog formatting only; low blast radius, but could impact CI release output if the git cliff invocation behaves differently than expected.

Overview
Updates xtasks/release-plz to generate changelog entries by prepending the new release (git cliff --unreleased --prepend CHANGELOG.md) instead of regenerating the entire file, preventing loss of previously injected aqua-registry sections.

Tweaks the AWK injection that appends the aqua-registry changelog block to ensure a blank line separator is inserted before adjacent release headers (and when appending at EOF).

Written by Cursor Bugbot for commit cb9b368. This will update automatically on new commits. Configure here.

…eases

git cliff -o regenerated the entire CHANGELOG.md from git history, wiping
out previously injected aqua-registry sections. Switch to --unreleased
--prepend to only add the new release entry while preserving existing
content. Also fix missing blank line separators between the injected aqua
section and adjacent release headers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 7, 2026 18:07
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jdx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses two key issues in the release process related to CHANGELOG.md generation. It updates the git cliff command to prevent the loss of previously injected aqua-registry sections when generating new release entries. Additionally, it corrects the formatting of these injected sections by ensuring proper blank line separation from release headers, thereby maintaining the integrity and readability of the changelog across releases.

Highlights

  • Changelog Generation Command Update: Modified the git cliff command from -o CHANGELOG.md to --unreleased --prepend CHANGELOG.md. This change ensures that existing changelog content, specifically aqua-registry sections from older releases, is preserved when new release entries are added, preventing accidental overwrites.
  • Changelog Formatting Fix: Added explicit print "" statements within the AWK script responsible for injecting aqua-registry sections. This resolves a formatting issue where trailing newlines were stripped by bash, leading to missing blank lines between injected sections and adjacent release headers.
Changelog
  • xtasks/release-plz
    • Updated the git cliff command to use --unreleased --prepend flags for appending new release entries while preserving existing changelog content.
    • Inserted print "" commands in the AWK script to add blank lines before injecting aqua-registry sections, resolving formatting issues.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the release automation to preserve previously injected aqua-registry changelog sections when generating new releases, while also fixing formatting between injected sections and release headers.

Changes:

  • Switch changelog generation to prepend only the new release entry instead of regenerating the entire file.
  • Add explicit blank lines around injected aqua-registry sections to ensure proper separation/formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

git cliff --tag "v$version" -o CHANGELOG.md
# Use --unreleased --prepend to only add the new release entry, preserving existing content
# (including previously injected aqua-registry sections from older releases)
git cliff --tag "v$version" --unreleased --prepend CHANGELOG.md
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git cliff previously wrote to CHANGELOG.md via -o CHANGELOG.md, but the updated command relies on --prepend CHANGELOG.md without an explicit output flag or redirection. In many git-cliff versions, --prepend affects how output is combined with an existing file but does not itself imply an output destination, which can result in the changelog being printed to stdout instead of updating CHANGELOG.md. To make the behavior unambiguous, write explicitly (e.g., add -o CHANGELOG.md and keep --prepend CHANGELOG.md, or redirect stdout to CHANGELOG.md if that matches the intended semantics).

Suggested change
git cliff --tag "v$version" --unreleased --prepend CHANGELOG.md
git cliff --tag "v$version" --unreleased --prepend CHANGELOG.md -o CHANGELOG.md

Copilot uses AI. Check for mistakes.
@jdx jdx enabled auto-merge (squash) February 7, 2026 18:13
@jdx jdx disabled auto-merge February 7, 2026 18:13
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses the issue of CHANGELOG.md being overwritten during releases by switching git cliff to prepend new entries. The changes also fix formatting issues by ensuring there are blank lines around the injected aqua-registry sections. The logic in the xtasks/release-plz script is sound and the changes are well-implemented. I have no further suggestions, great work!

@jdx jdx enabled auto-merge (squash) February 7, 2026 18:20
@jdx jdx merged commit a6a9b33 into main Feb 7, 2026
37 checks passed
@jdx jdx deleted the fix/changelog-preserve-aqua-sections branch February 7, 2026 18:21
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.6 x -- echo 21.3 ± 0.7 20.1 29.4 1.00
mise x -- echo 21.6 ± 0.9 20.4 28.3 1.01 ± 0.05

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.6 env 21.1 ± 0.9 19.3 27.0 1.00
mise env 21.7 ± 0.8 20.1 23.8 1.03 ± 0.06

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.6 hook-env 21.5 ± 0.5 20.4 23.1 1.00
mise hook-env 22.1 ± 0.8 20.7 28.2 1.03 ± 0.04

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.6 ls 19.5 ± 0.7 18.3 25.1 1.00
mise ls 19.6 ± 0.8 18.6 29.5 1.01 ± 0.05

xtasks/test/perf

Command mise-2026.2.6 mise Variance
install (cached) 113ms 114ms +0%
ls (cached) 72ms 72ms +0%
bin-paths (cached) 77ms 77ms +0%
task-ls (cached) 540ms 543ms +0%

mise-en-dev added a commit that referenced this pull request Feb 8, 2026
### 🚀 Features

- **(shim)** add native .exe shim mode for Windows by @jdx in
[#8045](#8045)

### 🐛 Bug Fixes

- **(install)** preserve config options and registry defaults by @jdx in
[#8044](#8044)
- **(link)** linked versions override lockfile during resolution by @jdx
in [#8050](#8050)
- **(release)** preserve aqua-registry sections in changelog across
releases by @jdx in [#8047](#8047)
- ls --all-sources shows duplicate entries by @roele in
[#8042](#8042)

### 📚 Documentation

- replace "inherit" terminology with config layering by @jdx in
[#8046](#8046)

### 📦 Registry

- switch oxlint to npm backend by default by @risu729 in
[#8038](#8038)
- add orval (npm:orval) by @zdunecki in
[#8051](#8051)

### New Contributors

- @zdunecki made their first contribution in
[#8051](#8051)
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
…eases (jdx#8047)

## Summary
- `git cliff -o` was regenerating the entire CHANGELOG.md from git
history, which wiped out previously injected aqua-registry sections from
older releases (since those sections come from the AWK injection, not
git commits)
- Switched to `git cliff --unreleased --prepend` to only add the new
release entry while preserving all existing content
- Fixed missing blank line separators between injected aqua sections and
adjacent release headers (bash `$()` strips trailing newlines, so AWK's
`print` alone wasn't enough)

## Test plan
- [ ] Verify next release preserves aqua-registry sections from previous
releases in CHANGELOG.md
- [ ] Verify blank line formatting between aqua section and next release
header

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Small change to release automation affecting changelog formatting
only; low blast radius, but could impact CI release output if the `git
cliff` invocation behaves differently than expected.
> 
> **Overview**
> Updates `xtasks/release-plz` to generate changelog entries by
*prepending* the new release (`git cliff --unreleased --prepend
CHANGELOG.md`) instead of regenerating the entire file, preventing loss
of previously injected `aqua-registry` sections.
> 
> Tweaks the AWK injection that appends the `aqua-registry` changelog
block to ensure a blank line separator is inserted before adjacent
release headers (and when appending at EOF).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cb9b368. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
### 🚀 Features

- **(shim)** add native .exe shim mode for Windows by @jdx in
[jdx#8045](jdx#8045)

### 🐛 Bug Fixes

- **(install)** preserve config options and registry defaults by @jdx in
[jdx#8044](jdx#8044)
- **(link)** linked versions override lockfile during resolution by @jdx
in [jdx#8050](jdx#8050)
- **(release)** preserve aqua-registry sections in changelog across
releases by @jdx in [jdx#8047](jdx#8047)
- ls --all-sources shows duplicate entries by @roele in
[jdx#8042](jdx#8042)

### 📚 Documentation

- replace "inherit" terminology with config layering by @jdx in
[jdx#8046](jdx#8046)

### 📦 Registry

- switch oxlint to npm backend by default by @risu729 in
[jdx#8038](jdx#8038)
- add orval (npm:orval) by @zdunecki in
[jdx#8051](jdx#8051)

### New Contributors

- @zdunecki made their first contribution in
[jdx#8051](jdx#8051)
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.

2 participants