Skip to content

Commit e18b7c2

Browse files
committed
Fix formatter merge-base with forks.
[ci skip]
1 parent 9ba0bca commit e18b7c2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/Format.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
repository: ${{github.event.pull_request.head.repo.full_name}}
2323
fetch-depth: 0
2424

25+
- name: Add upstream remote
26+
run: |
27+
git remote add upstream https://github.com/${{ github.repository }}
28+
git fetch upstream
29+
2530
- name: Setup Julia
2631
uses: julia-actions/setup-julia@v2
2732
with:
@@ -40,7 +45,7 @@ jobs:
4045
id: runic
4146
run: |
4247
set +e
43-
MERGE_BASE=$(git merge-base origin/${{ github.base_ref }} HEAD) || exit 2
48+
MERGE_BASE=$(git merge-base upstream/${{ github.base_ref }} HEAD) || exit 1
4449
DIFF=$(git runic --diff $MERGE_BASE)
4550
EXIT_CODE=$?
4651

0 commit comments

Comments
 (0)