Skip to content

Commit 3d34236

Browse files
authored
Merge pull request #12 from google/ojarjur/fix-mirror-workflow
Multiple fixes for the GitHub action mirroring workflow
2 parents 73a8678 + 1f2229c commit 3d34236

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/mirror-pull-requests.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ jobs:
1313
with:
1414
go-version: 1.14
1515

16-
- name: Setup git-appraise and the pr mirror
16+
- name: Setup go modules
1717
run: |
18+
export GO111MODULE=on
19+
go mod init workflow || true
1820
go get github.com/google/git-appraise/git-appraise
1921
go get github.com/google/git-pull-request-mirror/batch
2022
@@ -25,10 +27,12 @@ jobs:
2527
2628
- name: Fetch upstream refs
2729
run: |
30+
git fetch origin --unshallow
2831
git fetch origin '+refs/heads/*:refs/remotes/origin/*'
29-
git fetch origin '+refs/heads/master:refs/heads/master' || true
32+
git fetch origin '+refs/heads/master:refs/heads/master' || git pull
3033
git fetch origin '+refs/tags/*:refs/tags/*'
3134
git fetch origin '+refs/pull/*:refs/pull/*'
35+
git fetch origin '+refs/devtools/*:refs/devtools/*'
3236
3337
- name: Pull existing reviews
3438
run: go run github.com/google/git-appraise/git-appraise pull

0 commit comments

Comments
 (0)