Skip to content

Commit de6a19b

Browse files
authored
Fetch full repository to run a rebase. (#24838)
1 parent bd16d9c commit de6a19b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/sync-and-rebase-pr-from-fork.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
steps:
1414
- name: Checkout repository
1515
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
16+
with:
17+
fetch-depth: 0
1618

1719
- name: Setup Git
1820
run: |
@@ -44,9 +46,9 @@ jobs:
4446
git fetch --no-tags contributor +"$headRefName":"$contribHeadRefName"
4547
4648
# Rebase the branch with the latest targeting branch HEAD
47-
git fetch origin "$baseRefName"
4849
git checkout "$contribHeadRefName"
49-
if ! git rebase origin/"$baseRefName"; then
50+
git fetch origin "$baseRefName"
51+
if ! git rebase FETCH_HEAD; then
5052
echo "Rebase conflict detected. Please resolve the conflicts and push the changes to your fork. Exiting!"
5153
exit 1
5254
fi

0 commit comments

Comments
 (0)