Repository navigation
feat: protected labels enforcement with plane-aware authorization - #44664
Merged
Sameeksha Vaity (samvaity) merged 1 commit intoJul 20, 2026
Merged
Conversation
Next Steps to MergeNext steps that must be taken to merge this PR:
Comment generated by summarize-checks workflow run. |
Sameeksha Vaity (samvaity)
force-pushed
the
docs/label-approver-pattern
branch
6 times, most recently
from
July 15, 2026 22:32
db3b461 to
62e9992
Compare
Sameeksha Vaity (samvaity)
force-pushed
the
docs/label-approver-pattern
branch
8 times, most recently
from
July 17, 2026 17:14
df43c3b to
4ebca05
Compare
Sameeksha Vaity (samvaity)
marked this pull request as ready for review
July 17, 2026 17:23
Sameeksha Vaity (samvaity)
force-pushed
the
docs/label-approver-pattern
branch
from
July 17, 2026 20:40
4ebca05 to
666e8cd
Compare
Single workflow that prevents unauthorized users from applying protected labels. Config supports flat approver lists, plane-aware entries (management-plane/data-plane), and global approvers. Consolidates namespace-approvers.yml into protected-labels.yml - approvers.js now derives the ApproversConfig from plane-aware entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sameeksha Vaity (samvaity)
force-pushed
the
docs/label-approver-pattern
branch
from
July 17, 2026 22:00
666e8cd to
e5f9abe
Compare
Praveen Kuttappan (praveenkuttappan)
approved these changes
Jul 20, 2026
Sameeksha Vaity (samvaity)
merged commit Jul 20, 2026
54f328f
into
Azure:main
106 of 112 checks passed
This was referenced Jul 22, 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.
Protected Labels Enforcement
Single workflow that enforces label-based authorization. If an unauthorized user applies a protected label, the bot removes it and posts a warning.
How it works
protected-labels.ymlis the single source of truth for label authorization. It supports:Currently covers namespace approval labels. Other label types (breaking change, versioning) can be added once ownership is clarified with the ARM team.
Consolidation
Deletes
.github/namespace-approvers.yml- namespace authorization now lives inprotected-labels.ymlusing plane-aware entries. The namespace-approval workflow (validate-approval.js) focuses on business logic (pending/approved label transitions, status checks) and delegates auth tocheck-label.js.Security
pull_request_targetso config is always read from the base branch (prevents self-authorization)github-actions[bot],azure-sdk) bypassednamespace-approved-allrestricted to management-plane PRs only