From aee90d54e842f7cc9dd4bc5d860a583acca7c703 Mon Sep 17 00:00:00 2001 From: Derek Misler Date: Thu, 14 May 2026 13:00:00 +0000 Subject: [PATCH 1/2] fix(release): strip self-referential update-cagent-action entry from release notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/release.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e19122..61d880f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -283,6 +283,26 @@ jobs: fi gh release create "$VERSION" "${ARGS[@]}" + - name: Filter release notes + if: ${{ !inputs.pre_release }} + env: + VERSION: ${{ steps.version.outputs.version }} + GH_TOKEN: ${{ env.GITHUB_APP_TOKEN }} + run: | + # Strip the self-referential "chore: update cagent-action to vX.Y.Z" bullet that + # the update-self-refs job creates after each release. It always appears in the + # *next* release's auto-generated notes and is noise for readers. + # Docker Agent version bumps ("update Docker Agent to v*") are intentionally kept. + NOTES=$(gh release view "$VERSION" --repo docker/cagent-action --json body --jq '.body') + FILTERED=$(printf '%s' "$NOTES" | grep -v 'update cagent-action to v') + if [ "$FILTERED" = "$NOTES" ]; then + echo "No self-referential update entry found — release notes unchanged." + exit 0 + fi + printf '%s' "$FILTERED" > /tmp/release-notes-filtered.md + gh release edit "$VERSION" --repo docker/cagent-action --notes-file /tmp/release-notes-filtered.md + echo "✅ Removed self-referential update-cagent-action entry from release notes." + publish-agent: name: Push review-pr agent to Docker Hub needs: release From 28184f920b59050a9a43ec5b97057424e07149b8 Mon Sep 17 00:00:00 2001 From: Derek Misler Date: Thu, 14 May 2026 13:12:13 +0000 Subject: [PATCH 2/2] fix(release): guard grep exit code and empty result in filter step --- .github/workflows/release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61d880f..134b182 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -294,14 +294,18 @@ jobs: # *next* release's auto-generated notes and is noise for readers. # Docker Agent version bumps ("update Docker Agent to v*") are intentionally kept. NOTES=$(gh release view "$VERSION" --repo docker/cagent-action --json body --jq '.body') - FILTERED=$(printf '%s' "$NOTES" | grep -v 'update cagent-action to v') + FILTERED=$(printf '%s' "$NOTES" | grep -v 'update cagent-action to v' || true) + if [ -z "$FILTERED" ]; then + echo "ℹ️ All lines were self-referential — leaving release notes unchanged to avoid blank notes." + exit 0 + fi if [ "$FILTERED" = "$NOTES" ]; then - echo "No self-referential update entry found — release notes unchanged." + echo "ℹ️ No self-referential lines found — release notes unchanged." exit 0 fi printf '%s' "$FILTERED" > /tmp/release-notes-filtered.md gh release edit "$VERSION" --repo docker/cagent-action --notes-file /tmp/release-notes-filtered.md - echo "✅ Removed self-referential update-cagent-action entry from release notes." + echo "✅ Release notes filtered and updated." publish-agent: name: Push review-pr agent to Docker Hub