ci: suppress CODEOWNERS auto-tagging on release-branch PRs#1174
Conversation
Add a workflow that empties .github/CODEOWNERS on newly created release/* branches. GitHub resolves code owners from a pull request's base branch, so release branches inheriting dev's full ownership map cause every doc team to be auto-requested on any large or cross-wired PR targeting them. Emptying CODEOWNERS on release branches scopes code-owner auto-requests to PRs targeting dev. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code ReviewScope: one new workflow file ( Overall the workflow is well-constructed. A few things to be aware of — none are hard blockers, but the first is worth confirming. Observations 1. [Info] 2. [Low] 3. [Low/Info] Push may fail if release branches are protected. The job pushes a bot commit directly to Looks correct
|
What
Adds
.github/workflows/suppress-codeowners-on-release.yml, which empties.github/CODEOWNERSonce on any newly createdrelease/*branch.Why
GitHub resolves code owners from the base branch of a pull request. Release branches are cut from
devand inherit its full ownership map, so any large or cross-wired PR targeting a release branch auto-requests every doc team.This recently happened on PR #1171 (
reapply-pr-1032-stateintime-note→release/auditor_10.9): the branch fell ~243 commits behind, a sync temporarily ballooned its diff to 200+ files spanning every product, and all doc teams were tagged — even though the final merged diff was only 2 files.Emptying CODEOWNERS on release branches scopes code-owner auto-requests to PRs targeting
dev, where the full ownership map lives. (Code-owner auto-requests fire regardless of branch protection, so this per-branch CODEOWNERS file is the only native lever.)How
createevent, gated torelease/*branches. The workflow must live on the default branch (dev) forcreateto fire it.mainare untouched.GITHUB_TOKEN, so they don't retrigger CI or loop.Follow-up (not in this PR)
The already-existing
release/auditor_10.9needs a one-time empty-CODEOWNERS commit pushed directly to it — the Action only covers branches created from now on.🤖 Generated with Claude Code