feat(requirements): support allowed_approval_reviewers#16701
Open
feat(requirements): support allowed_approval_reviewers#16701
Conversation
7888c91 to
2a352b8
Compare
70fc446 to
95ddc09
Compare
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.
Description
Add requirements.toml support for
allowed_approvals_reviewers = ["user", "guardian_subagent"], so admins can now restrict the use of guardian mode.Note: If a user sets a reviewer that isn’t allowed by requirements.toml, config loading falls back to the first allowed reviewer and emits a startup warning.
The table below describes the possible admin controls.
requirements.tomlconfig.tomlallowed_approvals_reviewersor set["user", "guardian_subagent"]approvals_reviewer = "user"or"guardian_subagent"user, on forguardian_subagent+approval_policy = "on-request"allowed_approvals_reviewers = ["user"]user; Guardian offallowed_approvals_reviewers = ["guardian_subagent"]and usuallyallowed_approval_policies = ["on-request"]approval_policy = "on-request"unless policy is forcedguardian_subagent; Guardian on when effective approval policy ison-requestallowed_approvals_reviewers = ["user", "guardian_subagent"]approvals_revieweruser; Guardian offallowed_approvals_reviewers = ["user", "guardian_subagent"]approvals_reviewer = "guardian_subagent"andapproval_policy = "on-request"allowed_approvals_reviewers = []