workflows/pr-severity: allow non-write users for classification

The PR severity classifier was failing for external contributors because
the claude-code-action checks that the actor has write permissions. Since
this workflow only reads PR metadata via the API and doesn't execute any
code from the PR (and has restricted tool permissions), it's safe to allow
any user to trigger classification.
This commit is contained in:
Olaoluwa Osuntokun committed 2026-01-29 15:57:18 -04:00
1 parent bcb589cc9e
commit a77b9d9b89
1 file changed
+5
+5
View File
@@ -37,6 +37,11 @@ jobs:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.PR_SEVERITY_BOT_TOKEN }}
# Allow any user since this workflow only reads PR metadata via API
# and doesn't execute any code from the PR. Tool permissions are
# restricted to gh pr commands only.
allowed_non_write_users: "*"
# Allow Claude to manage labels and post comments.
# Keep permissions minimal to limit prompt injection risk.
claude_args: --allowedTools "Bash(gh pr view:*)" "Bash(gh pr edit:*)" "Bash(gh pr comment:*)"