ci(release): filter non-faigate topics from release notes#224
Merged
github-actions[bot] merged 1 commit intomainfrom Apr 26, 2026
Merged
ci(release): filter non-faigate topics from release notes#224github-actions[bot] merged 1 commit intomainfrom
github-actions[bot] merged 1 commit intomainfrom
Conversation
Adds .github/workflows/prerelease.yml that runs on tag push (or manual
dispatch). It generates the unreleased changelog with git-cliff, strips
bullet lines that mention personal tooling or local setup details via
.github/scripts/filter-changelog.py, and attaches the cleaned notes to
the GitHub release.
The filter has a deny list of patterns and a self-test ('--self-test')
that runs in CI before each filter pass to fail fast if the rule set
regresses. Empty headings are pruned automatically when their bullets
all get filtered out.
AGENTS.md gains a 'Content boundary' section documenting the rule:
release notes, changelogs, PR descriptions, and commit messages must
not reference non-faigate topics. The workflow is a safety net; the
rule keeps the source clean.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/prerelease.ymlthat runs on tag push and rewrites the GitHub release body with filtered notes..github/scripts/filter-changelog.pywith a deny-list of non-faigate patterns and a self-test that runs in CI.AGENTS.mddocumenting the rule for humans and agents.How the filter works
git-cliff --tag <vX.Y.Z> --strip header --unreleasedgenerates raw notes.filter-changelog.py raw-notes.md > filtered-notes.mddrops bullet lines whose content matches any deny pattern (case-insensitive).gh release edit/create --notes-file filtered-notes.mdpublishes the cleaned notes.The filter only touches bullet lines. Prose paragraphs are kept verbatim — the operator-author is trusted there.
What gets filtered
Patterns currently in the deny list:
/Users/<name>/,~/Library/,~/Documents/The script logs the dropped lines to stderr so the workflow run page shows what the filter caught.
Self-test
The workflow runs this before every filter pass, so a regression in the deny list fails the run rather than silently letting bad content through.
Manual override:
python3 .github/scripts/filter-changelog.py --check raw.mdexits 1 if anything would be dropped — useful for local pre-tag checks.Test plan
python3 .github/scripts/filter-changelog.py --self-test— passpython3 -c 'import yaml; yaml.safe_load(open(".github/workflows/prerelease.yml"))'— valid YAMLfilter-changelog.pycover the cases you've seen leak. Pattern set is a single list at top of file — easy to extend.vX.Y.Ztag and verify the prerelease workflow rewrites the release body. Filtered + raw notes are also uploaded as artifacts (30d retention) so anything wrongly dropped can be recovered manually.Why no test for the workflow itself
The workflow's testable logic lives in the Python script, which has the self-test. The yaml itself is mostly glue (
gh release edit ...); a full end-to-end check needs a real tag — the dry-run on next release will be the smoke test.🤖 Generated with Claude Code