From 8f324644962e539b7cf0a77c0d0d998ed2079753 Mon Sep 17 00:00:00 2001 From: Manuel Carrera Date: Tue, 5 Mar 2024 09:28:17 -0700 Subject: [PATCH] fix: Update forward merge to track remote branch [skip release] (#2627) If for some reason someone has a branch on their forked repository that matches the branch on remote, the commands fails. This change ensures that it always tracks upstream remote instead of what you might have on your own forked repo. [category:Infrastructure] Co-authored-by: manuel.carrera --- .github/workflows/forward-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/forward-merge.yml b/.github/workflows/forward-merge.yml index bdc4b0b772..2256ef3826 100644 --- a/.github/workflows/forward-merge.yml +++ b/.github/workflows/forward-merge.yml @@ -194,7 +194,7 @@ jobs: ``` git branch -D merge/${{needs.get-branch-names.outputs.branch}}-into-${{ needs.get-branch-names.outputs.next-branch }} || true git fetch upstream - git checkout merge/${{needs.get-branch-names.outputs.branch}}-into-${{ needs.get-branch-names.outputs.next-branch }} + git checkout --track upstream/merge/${{needs.get-branch-names.outputs.branch}}-into-${{ needs.get-branch-names.outputs.next-branch }} git pull upstream merge/${{needs.get-branch-names.outputs.branch}}-into-${{ needs.get-branch-names.outputs.next-branch }} -f node utils/forward-merge.js ```