Repository navigation
Add GHA workflow to auto-apply Servicing-consider label on servicing branch PRs - #54641
Conversation
Co-authored-by: baronfel <[email protected]>
…branch PRs Co-authored-by: baronfel <[email protected]>
Servicing-consider label on servicing branch PRs
…11.* Co-authored-by: baronfel <[email protected]>
|
Need to do a zizmor pass on this. |
…t bot PRs as codeflow Co-authored-by: baronfel <[email protected]>
…ion files Co-authored-by: baronfel <[email protected]>
| - 'release/9.*' | ||
| - 'release/10.*' | ||
| - 'release/11.*' | ||
| - 'release/**' |
There was a problem hiding this comment.
@copilot we need to skip release/dnup - can the pattern enforce a constraint that the branch name looks like a version?
There was a problem hiding this comment.
Updated the branch pattern to release/[0-9]* — this matches only branches whose name starts with a digit after release/ (e.g. release/8.0, release/10.0, release/8.0.1xx) and excludes non-version branches like release/dnup. Commit 9183db5.
Co-authored-by: baronfel <[email protected]>
… re-introduced Co-authored-by: baronfel <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR introduces automation to prevent accidental merges into servicing branches without tactics review by automatically applying the Servicing-consider blocking label on qualifying PRs targeting versioned release/* branches, and documents the new behavior.
Changes:
- Add a new
pull_request_targetworkflow that auto-appliesServicing-considerfor PRs targetingrelease/[0-9]*, with exemptions for codeflow bot PRs (intended) and test-only PRs. - Add pagination when listing PR files to correctly detect test-only PRs for large changes.
- Update the SDK PR guide to document the new auto-labeling behavior and exemptions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/add-servicing-consider-label.yml |
Adds the GitHub Actions workflow that applies Servicing-consider based on target branch, author/labels, and changed-file scope. |
documentation/project-docs/SDK-PR-guide.md |
Documents the new auto-labeling behavior and exemption cases for servicing-branch PRs. |
- Pin actions/github-script to commit SHA (f28e40c7) instead of tag v7 - Add zizmor ignore comment for pull_request_target (safe: no PR code checkout) Co-authored-by: Copilot <[email protected]>
- Fix misleading comment: guard checks repo name, not fork status - Narrow bot exemption to specific codeflow bots instead of all bots - Fix doc to match actual branch pattern (release/[0-9]*) Co-authored-by: Copilot <[email protected]>
The
Servicing-considerlabel blocks PR merges viapr-analysis.yml, but previously had to be manually applied — creating risk of accidentally merging new features into servicing branches without tactics approval.Changes
New workflow
.github/workflows/add-servicing-consider-label.yml:pull_request_target(opened,reopened,ready_for_review) for PRs targeting version-likerelease/[0-9]*branches (e.g.release/8.0,release/10.0) — excludes non-version branches likerelease/dnupServicing-considerlabel to qualifying PRsbackportlabel (covers inter-branch merge flow viagithub-actions[bot]and darc subscriptions viadotnet-maestro[bot])backport) — these do receiveServicing-considerautomaticallytest/Servicing-considerorServicing-approvedDocs
documentation/project-docs/SDK-PR-guide.md: documents the new auto-labeling behavior and which PR types are exempt