Repository navigation
Conversation
Copilot
AI
changed the title
[WIP] Add option to restrict commands to org members
Add per-command org-member permissions
Jul 25, 2026
There was a problem hiding this comment.
🟢 Approval recommended
Permission enforcement is consistently implemented, backward-compatible, documented, and adequately tested.
0 open findings
What changed in this PR
Adds optional per-command organization-member authorization while preserving open access by default.
Changes:
- Adds
allandmemberpermission levels. - Extracts webhook author associations and enforces permissions across all commands.
- Updates defaults, documentation, and tests.
| File | Description |
|---|---|
README.md |
Documents permission configuration. |
app/default-config.js |
Adds default all permissions. |
app/comment-extractor.js |
Extracts author associations. |
app/comment-extractor.test.js |
Tests payload extraction. |
app/command-enabled.js |
Implements permission enforcement. |
app/command-enabled.test.js |
Tests member and default access. |
app/commands/close-command.js |
Passes author association. |
app/commands/reopen-command.js |
Passes author association. |
app/commands/label-command.js |
Passes author association. |
app/commands/remove-label-command.js |
Passes author association. |
app/commands/reviewer-command.js |
Passes author association. |
app/commands/transfer-command.js |
Passes author association. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
This adds optional command-level permission controls so repositories can restrict specific comment-ops commands to organization members. By default, commands remain open to all commenters, preserving current behavior.
Per-command permission model
permissionto each command configall(default): any commenter may invoke the commandmember: only orgMEMBERandOWNERauthors may invoke the commandAuthorization enforcement
author_associationclosereopenlabelremove-labelreviewertransferConfig and docs
permission: allTest coverage
permissionis unsetmemberaccess for org members/ownersExample configuration: