File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 3030 with :
3131 fetch-depth : 1
3232
33+ - name : Checkout PR branch (handles fork PRs)
34+ if : github.event.issue.pull_request || github.event_name == 'pull_request_review_comment' || github.event_name == 'pull_request_review'
35+ env :
36+ GH_TOKEN : ${{ github.token }}
37+ run : |
38+ if [ "${{ github.event_name }}" = "issue_comment" ]; then
39+ PR_NUMBER=${{ github.event.issue.number }}
40+ else
41+ PR_NUMBER=${{ github.event.pull_request.number }}
42+ fi
43+ gh pr checkout "$PR_NUMBER"
44+
3345 - name : Run Claude Code
3446 id : claude
3547 uses : anthropics/claude-code-action@v1
Original file line number Diff line number Diff line change 3737 claude_code_oauth_token : ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3838 github_token : ${{ secrets.PR_SEVERITY_BOT_TOKEN }}
3939
40+ # Allow any user since this workflow only reads PR metadata via API
41+ # and doesn't execute any code from the PR. Tool permissions are
42+ # restricted to gh pr commands only.
43+ allowed_non_write_users : " *"
44+
4045 # Allow Claude to manage labels and post comments.
4146 # Keep permissions minimal to limit prompt injection risk.
4247 claude_args : --allowedTools "Bash(gh pr view:*)" "Bash(gh pr edit:*)" "Bash(gh pr comment:*)"
You can’t perform that action at this time.
0 commit comments