Skip to content

Commit 688664f

Browse files
[Github] Make code formatting action checkout SHA rather than ref
Checking out a ref of the branch requires the remote to be the same as the fork whereas setting it to be the commit SHA allows for us to avoid changing the remote. This should fix the action not working on PRs made from forks (essentially all of them).
1 parent ee95819 commit 688664f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/pr-code-format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
- name: Fetch LLVM sources
1212
uses: actions/checkout@v4
1313
with:
14-
ref: ${{ github.event.pull_request.head.ref }}
14+
ref: ${{ github.event.pull_request.head.sha }}
1515

1616
- name: Checkout through merge base
1717
uses: rmacklin/fetch-through-merge-base@v0
1818
with:
1919
base_ref: ${{ github.event.pull_request.base.ref }}
20-
head_ref: ${{ github.event.pull_request.head.ref }}
20+
head_ref: ${{ github.event.pull_request.head.sha }}
2121
deepen_length: 500
2222

2323
- name: Get changed files

0 commit comments

Comments
 (0)