File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,21 @@ jobs:
13
13
runs-on : ubuntu-latest
14
14
permissions :
15
15
pull-requests : write
16
- if : github.event.issue.pull_request
16
+ if : github.event_name != 'issue_comment' || github. event.issue.pull_request
17
17
steps :
18
- - name : Get PR branch
19
- uses : xt0rted/pull-request-comment-branch@v1
20
- id : comment-branch
21
-
22
18
- name : Checkout
23
19
id : checkout
24
20
uses : actions/checkout@v4
25
- with :
26
- ref : ${{ steps.comment-branch.outputs.head_ref }}
21
+
22
+ - name : Checkout Pull Request
23
+ if : github.event.issue.pull_request
24
+ env :
25
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26
+ run : |
27
+ PR_URL="${{ github.event.issue.pull_request.url }}"
28
+ PR_NUM=${PR_URL##*/}
29
+ echo "Checking out from PR #$PR_NUM based on URL: $PR_URL"
30
+ hub pr checkout $PR_NUM
27
31
28
32
- name : Test Local Action
29
33
id : test-action
You can’t perform that action at this time.
0 commit comments