Browse Source

Make the PR-mirroring workflow use the entire history of the current branch

The default behavior of the GitHub workflow is to only fetch the last
commit of the current branch (resulting in a shallow repository).

This causes issues for the workflow to mirror pull request metadata
into git-notes, as the full history of the repository is necessary
in order for that to work.

This change fixes that by modifying the local respitory to no longer
be a shallow clone.
Omar Jarjur 9 months ago
parent
commit
15d0b3b2e5
1 changed files with 1 additions and 0 deletions
  1. 1 0
      .github/workflows/mirror-pull-requests.yaml

+ 1 - 0
.github/workflows/mirror-pull-requests.yaml

@@ -27,6 +27,7 @@ jobs:
 
       - name: Fetch upstream refs
         run: |
+          git fetch origin --unshallow
           git fetch origin '+refs/heads/*:refs/remotes/origin/*'
           git fetch origin '+refs/heads/master:refs/heads/master' || git pull
           git fetch origin '+refs/tags/*:refs/tags/*'