Add roles restriction to /review slash command#11173
Merged
jonathanpeppers merged 1 commit intomainfrom Apr 21, 2026
Merged
Conversation
The android-reviewer workflow was missing the roles field, meaning any user (including non-maintainers and external contributors) could trigger the /review slash command on PRs. Add roles: [admin, maintainer, write] to restrict it to trusted users only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Restricts the android-reviewer agentic workflow’s /review slash command to trusted repository roles, preventing external/non-maintainer users from triggering automated reviews.
Changes:
- Add
roles: [admin, maintainer, write]to the workflow frontmatter for/reviewinvocation gating. - Regenerate the compiled workflow lock file to include the roles enforcement in the pre-activation membership check.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/android-reviewer.md | Adds roles restriction to the /review slash command configuration. |
| .github/workflows/android-reviewer.lock.yml | Updates compiled workflow output to reflect new frontmatter hash and roles-based gating. |
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.
The
android-revieweragentic workflow was missing therolesfield in its frontmatter, meaning any user (including non-maintainers and external contributors) could trigger the/reviewslash command on PRs.This adds
roles: [admin, maintainer, write]to restrict invocation to trusted users only, matching what dotnet/msbuild and dotnet/maui-labs already have.Reference: https://github.com/dotnet/maui-labs/pull/118/changes