Skip to content

Commit eb42bb3

Browse files
Update change_impact.yml
1 parent 86a5c7c commit eb42bb3

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

.github/workflows/change_impact.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,24 @@ jobs:
2424
comment-id: ${{ github.event.comment.id }}
2525
reactions: '+1'
2626

27+
- name: Get PR Head Ref using gh
28+
id: get_pr_head
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: |
32+
HEAD_REF=$(gh pr view ${{ github.event.issue.number }} --json headRefName --jq '.headRefName')
33+
echo "Using PR head ref: $HEAD_REF"
34+
echo "HEAD_REF=$HEAD_REF" >> $GITHUB_ENV
35+
2736
- name: Checkout PR source branch
2837
uses: actions/checkout@v4
2938
with:
30-
ref: ${{ github.event.issue.pull_request.head.ref }}
39+
ref: ${{ env.HEAD_REF }}
3140
fetch-depth: 0 # needed for full commit history
3241

3342
- name: Show current commit
3443
run: |
35-
echo "Current HEAD: $(git rev-parse HEAD)"
36-
37-
38-
- name: Install Rust toolchain
39-
uses: actions-rs/toolchain@v1
40-
with:
41-
toolchain: stable
42-
override: true
44+
echo "Current HEAD: $(git rev-parse HEAD)"
4345
4446
- name: Get Base Branch from PR using gh
4547
id: get_pr_base
@@ -67,6 +69,13 @@ jobs:
6769
run: |
6870
echo "Current HEAD: $(git rev-parse HEAD)"
6971
72+
73+
- name: Install Rust toolchain
74+
uses: actions-rs/toolchain@v1
75+
with:
76+
toolchain: stable
77+
override: true
78+
7079

7180
- name: Build reqflowcli from source
7281
run: |

0 commit comments

Comments
 (0)