chore(ci): make sponsor blurb append idempotent regardless of input#551
Conversation
#488 added a `grep -Fqx '## 💚 Sponsor aube'` exact-line check that skips the append when the canonical heading is already present. That handles re-runs of this workflow, but not the failure mode that just shipped two sponsor blocks in mise v2026.5.4: communique started including its own `## Sponsor aube` section (no heart emoji) in the generated body, the exact-match check missed it, and the workflow appended the canonical block on top. Switch to a strip-and-reappend pattern (matches what the same step in hk, fnox, and communique already do): pipe the body through a tiny awk filter that drops any `## .*Sponsor aube` heading and everything after it, plus trailing blanks, then append the canonical block. Idempotent regardless of whether the body already contains a sponsor section, in which variant, or none at all. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryReplaces the previous
Confidence Score: 5/5Safe to merge — the change is a targeted, well-scoped replacement of a single workflow step with no functional side-effects on other jobs. The awk logic is correct: blank-line buffering properly suppresses trailing whitespace, the pattern No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "chore(ci): make sponsor blurb append ide..." | Re-trigger Greptile |
Summary
#488 added a
grep -Fqx '## 💚 Sponsor aube'exact-line check that skips the append when the canonical heading is already present. That handles re-runs of this workflow, but not the failure mode that just bit mise:Sponsor misesections —communiquestarted including its own## Sponsor mise(no heart emoji) in the generated body, the equivalent exact-match check in mise missed it, and the workflow appended the canonical block on top. Fixed in jdx/mise#9745 and the v2026.5.4 release notes were edited by hand.The same drift can happen here. aube's check is
grep -Fqx '## 💚 Sponsor aube'(fixed-string, full-line), so a## Sponsor aubeheading fromcommuniquewould not match → duplicate block.Fix
Switch to a strip-and-reappend pattern (matches what the same step in
hk,fnox, andcommuniquealready do): pipe the body through a tinyawkfilter that drops any## .*Sponsor aubeheading and everything after it, plus trailing blank lines, then append the canonical block.Idempotent regardless of whether the body already contains a sponsor section, in which variant, or none at all.
Test plan
Simulated locally against four shapes — the existing canonical body (re-run case), a body containing
## Sponsor aube(no emoji, the failure mode), a body with no sponsor section at all, and a body with trailing blank lines. Each produces exactly one## 💚 Sponsor aubeblock with one blank line of separation.actionlintis clean on the modified workflow.## 💚 Sponsor aubesection.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need.Note
Low Risk
Low risk CI-only change, but it alters release-note editing logic and could affect the final GitHub release body formatting if the
awktrimming behaves unexpectedly.Overview
Updates the
release-plzworkflow’s “Append en.dev sponsor blurb” step to be fully idempotent by stripping any existingSponsor aubesection (emoji or non-emoji heading) and trailing blank lines before re-appending the canonical sponsor block.This replaces the prior exact-line
grepcheck so re-runs or communique-generated sponsor headings no longer produce duplicate sponsor sections in GitHub release notes.Reviewed by Cursor Bugbot for commit f4de71c. Bugbot is set up for automated code reviews on this repo. Configure here.