From 2d283713991e6857b1f188f74dc1e56bd77caf47 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Mon, 20 Jan 2025 11:35:49 +0100 Subject: [PATCH] Formatter: fix merge-base with forks. [ci skip] --- .github/workflows/Format.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Format.yml b/.github/workflows/Format.yml index 95fab03c..32afbf31 100644 --- a/.github/workflows/Format.yml +++ b/.github/workflows/Format.yml @@ -22,6 +22,11 @@ jobs: repository: ${{github.event.pull_request.head.repo.full_name}} fetch-depth: 0 + - name: Add upstream remote + run: | + git remote add upstream https://github.com/${{ github.repository }} + git fetch upstream + - name: Setup Julia uses: julia-actions/setup-julia@v2 with: @@ -40,7 +45,7 @@ jobs: id: runic run: | set +e - MERGE_BASE=$(git merge-base origin/${{ github.base_ref }} HEAD) || exit 2 + MERGE_BASE=$(git merge-base upstream/${{ github.base_ref }} HEAD) || exit 1 DIFF=$(git runic --diff $MERGE_BASE) EXIT_CODE=$?