Skip to content

fix(release): strip self-referential update-cagent-action entry from release notes#211

Open
derekmisler wants to merge 2 commits into
docker:mainfrom
derekmisler:fix/filter-release-notes
Open

fix(release): strip self-referential update-cagent-action entry from release notes#211
derekmisler wants to merge 2 commits into
docker:mainfrom
derekmisler:fix/filter-release-notes

Conversation

@derekmisler
Copy link
Copy Markdown
Contributor

Problem

Every GitHub release includes a bullet like:

* chore: update cagent-action to v1.5.2 by @docker-agent …

as the first entry. This is the self-referential auto-update PR produced by the update-self-refs job from the previous release cycle. It is noise for readers who expect only user-visible changes.

Solution

Add a Filter release notes step in the release job, immediately after Create GitHub Release. It:

  1. Fetches the auto-generated release body from the GitHub API.
  2. Removes any line containing update cagent-action to v (the self-referential bullet).
  3. Writes the cleaned body back via gh release edit --notes-file.

Because the notify job fetches release notes from the GitHub API (gh release view … --json body), it automatically receives the already-filtered body — no changes needed there.

What is preserved

Docker Agent version-bump entries (update Docker Agent to v*) are intentionally kept — they are genuinely useful to readers.

Why this approach

  • No labelling infrastructure required (alternative: .github/release.yml + label on the update-self-refs PR).
  • Single-file change, surgical filter.
  • Works retroactively if run manually via gh release edit on past releases.
  • actionlint passes cleanly on the modified workflow.

…release notes

After each release the update-self-refs job opens a PR titled
'chore: update cagent-action to vX.Y.Z'. When the *next* release is
created with --generate-notes, this PR is included as the first bullet
in the changelog, confusing readers who expect only user-visible changes.

Add a 'Filter release notes' step immediately after 'Create GitHub
Release'. It fetches the generated body, removes any line containing
'update cagent-action to v' (the self-referential auto-update bullet),
and writes the cleaned body back via 'gh release edit --notes-file'.

The notify job fetches release notes from the GitHub API so it will
automatically receive the already-filtered body with no further changes.

Docker Agent version bumps ('update Docker Agent to v*') are
intentionally preserved — they are genuinely useful to readers.
Copy link
Copy Markdown
Contributor

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

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

Assessment: 🟢 APPROVE

Comment thread .github/workflows/release.yml
@derekmisler derekmisler marked this pull request as ready for review May 14, 2026 13:06
Copy link
Copy Markdown
Contributor

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

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

Assessment: 🔴 CRITICAL

Two high-severity bugs were found in the new Filter release notes step.

Severity Finding
🔴 HIGH grep -v exits code 1 when all lines filtered → step aborts under errexit
🔴 HIGH Missing emptiness guard → empty $FILTERED silently blanks release notes

Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml
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