fix(ci): scope coverage PR-body injection to release PRs, derive badge filename per branch - #239
Merged
Merged
Conversation
…e filename per branch The coverage-pr-comment job in workflow-ci.yml gated only on github.event_name == 'pull_request', so every feature PR into next got whole-repo coverage injected into its description alongside the two persistent release PRs. Key on github.head_ref instead, which is only 'next'/'hotfixes' for those release PRs. Also derive badge_filename per branch (coverage.json for the default branch, coverage-<branch>.json otherwise) so a future widening of the coverage-badge trigger to next/hotfixes can't clobber master's badge JSON with theirs. A caller-supplied non-default filename still wins. Fixes #238
Contributor
|
Resolves #238 — closed when this ships to the default branch. |
Shinrai
previously approved these changes
Aug 20, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates the org-level CI entrypoint workflow to (1) avoid injecting coverage details into non-release PR descriptions and (2) avoid badge JSON filename collisions when publishing coverage from multiple branches.
Changes:
- Derive
badge_filenamefrom the current branch name (unless explicitly overridden) to prevent badge JSON clobbering across branches. - Restrict the PR coverage body-injection job to only run on the two persistent release PR source branches (
next,hotfixes).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…list badge filenames Addresses Copilot review on PR #239: - coverage-pr-comment gated only on head_ref == 'next'/'hotfixes', which a fork PR could spoof by naming its own head branch 'next'/'hotfixes' and running the job (pull-requests: write + bot secrets) against untrusted code. Add a same-repo check. - badge_filename derived via format('coverage-{0}.json', github.ref_name) against an arbitrary ref; GitHub Actions expressions have no string-replace function, so a branch name containing '/' would flow straight into the filename and break push-badge (no intermediate directory creation). Replace the open-ended format() with an explicit allowlist of the two known integration branch names (both guaranteed slash-free), falling back to the existing coverage.json otherwise.
Shinrai
approved these changes
Aug 20, 2026
cldmv-bot
Bot
deleted the
fix/coverage-pr-body-scope-and-badge-filename
branch
August 20, 2026 23:10
This was referenced Aug 20, 2026
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.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors