Skip to content

Add roles restriction to /review slash command#11173

Merged
jonathanpeppers merged 1 commit intomainfrom
jonathanpeppers/fix-reviewer-roles
Apr 21, 2026
Merged

Add roles restriction to /review slash command#11173
jonathanpeppers merged 1 commit intomainfrom
jonathanpeppers/fix-reviewer-roles

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

The android-reviewer agentic workflow was missing the roles field in its frontmatter, meaning any user (including non-maintainers and external contributors) could trigger the /review slash 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

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>
Copilot AI review requested due to automatic review settings April 21, 2026 19:16
@jonathanpeppers jonathanpeppers merged commit 9c57122 into main Apr 21, 2026
3 of 4 checks passed
@jonathanpeppers jonathanpeppers deleted the jonathanpeppers/fix-reviewer-roles branch April 21, 2026 19:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /review invocation 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.

Comment thread .github/workflows/android-reviewer.lock.yml
Comment thread .github/workflows/android-reviewer.lock.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants