Skip to content

Commit b8345a8

Browse files
authored
fix: update checkout step to handle issue comments for pull requests (#506)
1 parent db894fa commit b8345a8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/build-pipeline.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@v6
21+
with:
22+
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || github.ref }}
2123

2224
- name: Cache Node.js dependencies
2325
uses: actions/cache@v5
@@ -73,6 +75,8 @@ jobs:
7375
steps:
7476
- name: Checkout repository
7577
uses: actions/checkout@v6
78+
with:
79+
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || github.ref }}
7680

7781
- name: Cache Node.js dependencies
7882
uses: actions/cache@v5
@@ -131,6 +135,8 @@ jobs:
131135
steps:
132136
- name: Checkout repository
133137
uses: actions/checkout@v6
138+
with:
139+
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || github.ref }}
134140

135141
- name: Cache Node.js dependencies
136142
uses: actions/cache@v5

0 commit comments

Comments
 (0)