Skip to content

feat(release): include aqua-registry updates in changelog and release notes#6623

Merged
jdx merged 2 commits intomainfrom
feat/aqua-registry-changelog
Oct 10, 2025
Merged

feat(release): include aqua-registry updates in changelog and release notes#6623
jdx merged 2 commits intomainfrom
feat/aqua-registry-changelog

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Oct 10, 2025

Summary

Automatically tracks and displays aqua-registry package updates in both CHANGELOG.md and GitHub release notes.

Changes

When the xtasks/release-plz script updates the aqua-registry, it now:

  • Captures the before/after package lists
  • Detects new packages added to the registry
  • Detects existing packages with updated registry.yaml files
  • Generates markdown sections with GitHub links for each package
  • Injects the section into CHANGELOG.md after git-cliff runs
  • Includes the section in the GitHub PR body

Output Format

The generated sections include two lists:

  • New Packages (N): Packages that didn't exist before
  • Updated Packages (N): Packages where the registry.yaml changed

Each package is linked to its GitHub repository for easy reference.

Example Output

### 📦 Aqua Registry Updates

#### New Packages (5)

- [\`user/repo1\`](https://github.com/user/repo1)
- [\`user/repo2\`](https://github.com/user/repo2)
...

#### Updated Packages (147)

- [\`foo/bar\`](https://github.com/foo/bar)
- [\`baz/qux\`](https://github.com/baz/qux)
...

Benefits

Automated - No manual tracking needed
Accurate - Only shows actual changes, not all packages
Linked - Each package links directly to its GitHub repo
Consistent - Follows the existing emoji-based section format
Visibility - Appears in both CHANGELOG.md and GitHub release notes

Implementation Details

  • Created scripts/gen-aqua-changelog.sh helper script for better code organization
  • Modified xtasks/release-plz to call the helper and inject results into CHANGELOG.md
  • GitHub release notes automatically include aqua updates since they're generated from CHANGELOG.md via git-cliff

Test plan

  • Run next release and verify aqua-registry section appears in CHANGELOG.md
  • Verify aqua-registry section appears in release PR body
  • Verify GitHub release notes include aqua-registry updates

🤖 Generated with Claude Code


Note

Automatically detects new/updated aqua-registry packages and injects a linked summary into CHANGELOG.md and the release PR body during the release task.

  • Release automation (xtasks/release-plz):
    • Capture pre/post aqua-registry package lists and generate markdown sections via scripts/gen-aqua-changelog.sh (uses comm + git diff on pkgs/*/registry.yaml).
    • Inject "📦 Aqua Registry Updates" into CHANGELOG.md after git cliff output (before first ### section of the newest release) using awk.
    • Append the same section to the PR body when creating/editing the release PR.
  • New script: scripts/gen-aqua-changelog.sh
    • Produces "New Packages" and "Updated Packages" lists with GitHub links; supports configurable heading level.

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

… notes

This change automatically tracks and displays aqua-registry package
updates in both the CHANGELOG.md and GitHub release notes.

When the release-plz script updates the aqua-registry, it now:
- Captures the before/after package lists
- Detects new packages added to the registry
- Detects existing packages with updated registry.yaml files
- Generates markdown sections with GitHub links for each package
- Injects the section into CHANGELOG.md after git-cliff runs
- Includes the section in the GitHub PR body

The output is formatted with two lists:
- New Packages (N): Packages that didn't exist before
- Updated Packages (N): Packages where the registry.yaml changed

Each package is linked to its GitHub repository for easy reference.

Since GitHub release notes are generated from CHANGELOG.md via git-cliff,
the aqua-registry updates will automatically appear in release notes too.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings October 10, 2025 00:29
Copy link
Copy Markdown
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

This PR automatically tracks and displays aqua-registry package updates in both CHANGELOG.md and GitHub release notes by capturing before/after package lists and generating markdown sections with package information.

  • Captures package lists before and after aqua-registry updates to detect changes
  • Generates markdown sections showing new and updated packages with GitHub links
  • Injects aqua-registry updates into CHANGELOG.md and GitHub release PR bodies

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
xtasks/release-plz Modified to capture package lists, call changelog generation script, and inject aqua updates into changelog and PR bodies
scripts/gen-aqua-changelog.sh New script that compares package lists and generates markdown sections for new and updated packages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread xtasks/release-plz
Comment on lines +110 to +112
OLD_AQUA_PKGS=""
if [[ -d crates/aqua-registry/aqua-registry/pkgs ]]; then
OLD_AQUA_PKGS="$(find crates/aqua-registry/aqua-registry/pkgs -name registry.yaml -type f | sed 's|crates/aqua-registry/aqua-registry/pkgs/||;s|/registry.yaml||' | sort)"
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

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

The OLD_AQUA_PKGS capture logic runs before the directory is removed on line 115, but the directory may not exist on first run or clean checkouts, making the logic inconsistent.

Suggested change
OLD_AQUA_PKGS=""
if [[ -d crates/aqua-registry/aqua-registry/pkgs ]]; then
OLD_AQUA_PKGS="$(find crates/aqua-registry/aqua-registry/pkgs -name registry.yaml -type f | sed 's|crates/aqua-registry/aqua-registry/pkgs/||;s|/registry.yaml||' | sort)"
if [[ -d crates/aqua-registry/aqua-registry/pkgs ]]; then
OLD_AQUA_PKGS="$(find crates/aqua-registry/aqua-registry/pkgs -name registry.yaml -type f | sed 's|crates/aqua-registry/aqua-registry/pkgs/||;s|/registry.yaml||' | sort)"
else
OLD_AQUA_PKGS=""

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +26
if git diff --quiet HEAD -- "crates/aqua-registry/aqua-registry/pkgs/$pkg/registry.yaml" 2>/dev/null; then
: # No changes
else
UPDATED_PACKAGES+="$pkg"$'\n'
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

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

Using git diff --quiet HEAD may not work correctly when the aqua-registry directory was just cloned and files are untracked. Consider using git diff --no-index or checking if files are staged first.

Suggested change
if git diff --quiet HEAD -- "crates/aqua-registry/aqua-registry/pkgs/$pkg/registry.yaml" 2>/dev/null; then
: # No changes
else
UPDATED_PACKAGES+="$pkg"$'\n'
if ! git ls-files --error-unmatch "crates/aqua-registry/aqua-registry/pkgs/$pkg/registry.yaml" >/dev/null 2>&1; then
UPDATED_PACKAGES+="$pkg"$'\n'
elif ! git diff --quiet HEAD -- "crates/aqua-registry/aqua-registry/pkgs/$pkg/registry.yaml"; then
UPDATED_PACKAGES+="$pkg"$'\n'

Copilot uses AI. Check for mistakes.
Comment thread scripts/gen-aqua-changelog.sh Outdated
Comment on lines +31 to +32
NEW_COUNT=$(echo "$NEW_PACKAGES" | grep -c . || echo "0")
UPDATED_COUNT=$(echo "$UPDATED_PACKAGES" | grep -c . || echo "0")
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

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

When variables are empty strings, echo \"\" | grep -c . returns 0 but grep -c can fail with non-zero exit code in some shells. Consider using wc -l instead or ensure the variables contain newlines for accurate counting.

Suggested change
NEW_COUNT=$(echo "$NEW_PACKAGES" | grep -c . || echo "0")
UPDATED_COUNT=$(echo "$UPDATED_PACKAGES" | grep -c . || echo "0")
NEW_COUNT=$(echo "$NEW_PACKAGES" | wc -l)
UPDATED_COUNT=$(echo "$UPDATED_PACKAGES" | wc -l)

Copilot uses AI. Check for mistakes.
cursor[bot]

This comment was marked as outdated.

The grep -c command exits with a non-zero status when there are no
matches, causing the script to terminate due to set -e before the
|| echo "0" fallback can execute.

Changed to use || true and explicit zero-check to properly handle
the case when there are no new or updated packages.
@jdx jdx enabled auto-merge (squash) October 10, 2025 00:32
@jdx jdx merged commit f2ab485 into main Oct 10, 2025
26 checks passed
@jdx jdx deleted the feat/aqua-registry-changelog branch October 10, 2025 00:40
@github-actions
Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.10.6 x -- echo 18.6 ± 0.5 17.7 23.8 1.00
mise x -- echo 19.1 ± 0.5 18.0 21.0 1.02 ± 0.04

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.10.6 env 18.0 ± 0.3 17.2 21.2 1.00
mise env 18.2 ± 0.3 17.3 19.6 1.01 ± 0.03

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.10.6 hook-env 17.5 ± 0.5 16.4 21.6 1.00
mise hook-env 17.8 ± 0.6 16.4 19.8 1.02 ± 0.05

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.10.6 ls 15.7 ± 0.4 14.7 17.0 1.00
mise ls 16.0 ± 0.3 15.2 17.9 1.02 ± 0.03

xtasks/test/perf

Command mise-2025.10.6 mise Variance
install (cached) 203ms ✅ 108ms +87%
ls (cached) 65ms 65ms +0%
bin-paths (cached) 72ms 71ms +1%
task-ls (cached) 475ms 478ms +0%

✅ Performance improvement: install cached is 87%

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants