Skip to content

Commit 1b96538

Browse files
committed
do a quicker merge-base calculation
1 parent 53917e5 commit 1b96538

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.github/workflows/compile-queries.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v3
17-
with:
18-
fetch-depth: 0
1917
# calculate the merge-base with main, in a way that works both on PRs and pushes to main.
2018
- name: Calculate merge-base
2119
if: ${{ github.event_name == 'pull_request' }}
2220
env:
2321
BASE_BRANCH: ${{ github.base_ref }}
2422
run: |
25-
MERGE_BASE=$(git merge-base --fork-point origin/$BASE_BRANCH)
23+
MERGE_BASE=$(git cat-file commit $GITHUB_SHA | grep '^parent ' | head -1 | cut -f 2 -d " ")
2624
echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
2725
- name: Read CodeQL query compilation - PR
2826
if: ${{ github.event_name == 'pull_request' }}

0 commit comments

Comments
 (0)