From a6b98c427244b9a6ee82eb955820f77a8a967359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Tue, 7 Nov 2023 16:16:36 +0100 Subject: [PATCH] Use depth 100 --- .github/workflows/PR-into-next-version.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/PR-into-next-version.yml b/.github/workflows/PR-into-next-version.yml index 68cf29186..083682d0c 100644 --- a/.github/workflows/PR-into-next-version.yml +++ b/.github/workflows/PR-into-next-version.yml @@ -28,10 +28,13 @@ jobs: runs-on: ubuntu-latest steps: # checkout the target branch + # Only fetch 100 commits, assuming that if the difference between branches is more than 100 commits then they + # probably won't be automergeable anyway. - name: Checkout ${{ inputs.to-version }} uses: actions/checkout@v3 with: ref: ${{ inputs.to-branch }} + fetch-depth: 100 # actually merge from the previous branch - name: Perform merge from ${{ inputs.from-version }} to ${{ inputs.to-version }} @@ -40,7 +43,7 @@ jobs: git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - git fetch origin ${{ inputs.from-branch }} --depth=1 + git fetch origin ${{ inputs.from-branch }} --depth=100 # actual merge operation git merge --no-ff --message "Merge ${{ inputs.from-branch }}" origin/${{ inputs.from-branch }} -- || ( echo "Merge failed. Please merge manually!" ; exit 1 )