chore(ci): make sponsor blurb append idempotent#627
Conversation
The "Append en.dev sponsor blurb" step concatenates the GitHub release body with a heredoc'd canonical sponsor section unconditionally — no detection of an existing block. mise v2026.5.4 just shipped two "Sponsor mise" sections after communique started inserting its own `## Sponsor mise` block; usage uses the same pattern and would fail in the same way the next time communique decides to include a sponsor section. Pipe the fetched body through a small awk filter that drops any `## .*Sponsor usage` heading and everything after it, plus trailing blank lines, before appending the canonical block. Idempotent regardless of what's currently in the body. Matches the strip-and- reappend approach already used in hk, fnox, and communique. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Greptile SummaryThis PR adds an
Confidence Score: 5/5Safe to merge — the change is scoped to a single CI step with no impact on build artifacts or source code. The awk filter is small and self-contained. Blank-line buffering is correct: internal blank lines are preserved and trailing ones are dropped. The regex matches both the communique-generated and canonical heading forms. The heredoc's leading blank line ensures proper separation even when the filtered body ends on a content line. No missing guards, no side effects outside the release-notes file, and the step already writes to a temp file before calling No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "chore(ci): make sponsor blurb append ide..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #627 +/- ##
=======================================
Coverage 78.94% 78.94%
=======================================
Files 49 49
Lines 7284 7284
Branches 7284 7284
=======================================
Hits 5750 5750
Misses 1147 1147
Partials 387 387 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
The "Append en.dev sponsor blurb" step concatenates the GitHub release body with a heredoc'd canonical sponsor section unconditionally — there is no detection of an existing block.
mise v2026.5.4 just shipped two
Sponsor misesections aftercommuniquestarted inserting its own## Sponsor miseblock in the generated body. Fix: jdx/mise#9745; the release notes were edited by hand.usageuses the same append-without-detection pattern and would fail in the same way the next timecommuniquedecides to include a sponsor section.Fix
Pipe the fetched body through a small
awkfilter that drops any## .*Sponsor usageheading and everything after it, plus trailing blank lines, before appending the canonical block. Idempotent regardless of what's currently in the body. Matches the strip-and-reappend approach already used inhk,fnox, andcommunique.Test plan
Simulated against three shapes — a body with no sponsor section (today's case), a body containing
## Sponsor usagefrom communique (the failure mode), and a body with trailing blank lines. Each produces exactly one## 💚 Sponsor usageblock with one blank line of separation.actionlintis clean on the modified workflow.## 💚 Sponsor usagesection.🤖 Generated with Claude Code
Note
Low Risk
Low risk CI-only change that affects GitHub release note formatting; primary risk is accidentally truncating release notes if the
awkpattern matches unexpected headings.Overview
Prevents duplicate sponsor sections in GitHub release notes by making the
Append en.dev sponsor blurbstep idempotent.The workflow now filters the existing release body through an
awkscript that strips any prior## .*Sponsor usageblock (and trailing blank lines) before appending the canonical sponsor blurb and updating the release notes.Reviewed by Cursor Bugbot for commit c884237. Bugbot is set up for automated code reviews on this repo. Configure here.