File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1010 permissions :
1111 contents : read
1212 pull-requests : write
13+ issues : write
1314 steps :
1415 # Check out the code to allow git diff operations
1516 - name : Checkout code
Original file line number Diff line number Diff line change @@ -12,12 +12,33 @@ jobs:
1212 contents : write
1313 pull-requests : write
1414 issues : write
15+ discussions : write
16+ id-token : write
17+ statuses : write
1518 steps :
1619 - name : Checkout code
1720 uses : actions/checkout@v4
1821 with :
1922 fetch-depth : 0 # Fetch full history for accurate diffs
2023
24+ # If running on a PR comment, we need to explicitly check out the PR branch
25+ - name : Checkout PR branch if needed
26+ if : github.event.issue.pull_request
27+ env :
28+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ run : |
30+ # Get the PR number from the issue object
31+ PR_NUMBER="${{ github.event.issue.number }}"
32+
33+ echo "Checking out PR #${PR_NUMBER}"
34+
35+ # Use GitHub CLI to checkout the PR
36+ # This handles both internal branches and forks automatically
37+ gh pr checkout ${PR_NUMBER}
38+
39+ echo "Current branch: $(git branch --show-current)"
40+ git status
41+
2142 - name : Claude Response
2243 uses : anthropics/claude-code-action@beta
2344 with :
4970 GlobTool # Find files by pattern
5071 GrepTool # Search file contents
5172 BatchTool # Run multiple tools in parallel
52-
5373
5474 # Timeout after 20 minutes
5575 timeout_minutes : 20
Original file line number Diff line number Diff line change 1717 contents : write
1818 pull-requests : write
1919 issues : write
20+ discussions : write
21+ id-token : write
22+ statuses : write
2023 steps :
2124 - name : Checkout code
2225 uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments