From 0c4adf2bf15214b72ca40bce664145e5c2bfc54c Mon Sep 17 00:00:00 2001 From: Misha Kav Date: Thu, 29 May 2025 15:19:30 +0300 Subject: [PATCH 1/6] fix: update checkout command to use upstream reference for head branch --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9e09661e..c64f70de 100644 --- a/action.yml +++ b/action.yml @@ -137,7 +137,7 @@ runs: git fetch --deepen=$ALL upstream $'${{ steps.safe-strings.outputs.head_ref }}' git checkout -b $'upstream/${{ steps.safe-strings.outputs.head_ref}}' $'upstream/${{ steps.safe-strings.outputs.head_ref}}' git checkout $'${{ steps.safe-strings.outputs.base_ref }}' - git checkout $'${{ steps.safe-strings.outputs.head_ref }}' + git checkout upstream/$'${{ steps.safe-strings.outputs.head_ref }}' - name: Create cm folder if: ${{ env.SHOULD_CHECKOUT == 'true' }} From c9678bc3d9b42bed35e31ed58edb53de84c5f310 Mon Sep 17 00:00:00 2001 From: Misha Kav Date: Thu, 29 May 2025 15:31:43 +0300 Subject: [PATCH 2/6] fix: correct checkout command to use proper syntax for upstream reference --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c64f70de..1c3aa32f 100644 --- a/action.yml +++ b/action.yml @@ -137,7 +137,7 @@ runs: git fetch --deepen=$ALL upstream $'${{ steps.safe-strings.outputs.head_ref }}' git checkout -b $'upstream/${{ steps.safe-strings.outputs.head_ref}}' $'upstream/${{ steps.safe-strings.outputs.head_ref}}' git checkout $'${{ steps.safe-strings.outputs.base_ref }}' - git checkout upstream/$'${{ steps.safe-strings.outputs.head_ref }}' + git checkout $'upstream/${{ steps.safe-strings.outputs.head_ref}}' - name: Create cm folder if: ${{ env.SHOULD_CHECKOUT == 'true' }} From e8f5aa62df6b4e6a3c7177cf53f0851ee4cf76a5 Mon Sep 17 00:00:00 2001 From: Misha Kav Date: Thu, 29 May 2025 17:09:22 +0300 Subject: [PATCH 3/6] fix: streamline checkout process by removing redundant commands --- action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/action.yml b/action.yml index 1c3aa32f..b2974fd9 100644 --- a/action.yml +++ b/action.yml @@ -136,8 +136,6 @@ runs: git remote add upstream $'${{ steps.safe-strings.outputs.url }}' git fetch --deepen=$ALL upstream $'${{ steps.safe-strings.outputs.head_ref }}' git checkout -b $'upstream/${{ steps.safe-strings.outputs.head_ref}}' $'upstream/${{ steps.safe-strings.outputs.head_ref}}' - git checkout $'${{ steps.safe-strings.outputs.base_ref }}' - git checkout $'upstream/${{ steps.safe-strings.outputs.head_ref}}' - name: Create cm folder if: ${{ env.SHOULD_CHECKOUT == 'true' }} From 050ce3df0ddbd5dc5aff98bfef8d5a939b479fc0 Mon Sep 17 00:00:00 2001 From: Misha Kav Date: Thu, 29 May 2025 17:18:56 +0300 Subject: [PATCH 4/6] fix: update checkout commands to correctly reference base and head branches --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index b2974fd9..abb2d303 100644 --- a/action.yml +++ b/action.yml @@ -136,6 +136,8 @@ runs: git remote add upstream $'${{ steps.safe-strings.outputs.url }}' git fetch --deepen=$ALL upstream $'${{ steps.safe-strings.outputs.head_ref }}' git checkout -b $'upstream/${{ steps.safe-strings.outputs.head_ref}}' $'upstream/${{ steps.safe-strings.outputs.head_ref}}' + git checkout origin/${{ steps.safe-strings.outputs.base_ref }} + git checkout upstream/${{ steps.safe-strings.outputs.head_ref }} - name: Create cm folder if: ${{ env.SHOULD_CHECKOUT == 'true' }} From ac4daf023a3f20189110e9b027eab7de2c514332 Mon Sep 17 00:00:00 2001 From: Misha Kav Date: Thu, 29 May 2025 17:24:59 +0300 Subject: [PATCH 5/6] fix: remove redundant checkout commands for base and head branches --- action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/action.yml b/action.yml index abb2d303..b2974fd9 100644 --- a/action.yml +++ b/action.yml @@ -136,8 +136,6 @@ runs: git remote add upstream $'${{ steps.safe-strings.outputs.url }}' git fetch --deepen=$ALL upstream $'${{ steps.safe-strings.outputs.head_ref }}' git checkout -b $'upstream/${{ steps.safe-strings.outputs.head_ref}}' $'upstream/${{ steps.safe-strings.outputs.head_ref}}' - git checkout origin/${{ steps.safe-strings.outputs.base_ref }} - git checkout upstream/${{ steps.safe-strings.outputs.head_ref }} - name: Create cm folder if: ${{ env.SHOULD_CHECKOUT == 'true' }} From 23a0c23f8b85513837aa8c5b01afabd970660270 Mon Sep 17 00:00:00 2001 From: Misha Kav Date: Mon, 30 Jun 2025 13:28:53 +0200 Subject: [PATCH 6/6] fix: enhance checkout process by configuring default remote and ensuring proper branch checkouts --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index b2974fd9..e2ab1603 100644 --- a/action.yml +++ b/action.yml @@ -132,10 +132,13 @@ runs: run: | ALL=2147483647 cd gitstream && cd repo + git config checkout.defaultRemote origin git fetch --deepen=$ALL origin $'${{ steps.safe-strings.outputs.base_ref }}' git remote add upstream $'${{ steps.safe-strings.outputs.url }}' git fetch --deepen=$ALL upstream $'${{ steps.safe-strings.outputs.head_ref }}' git checkout -b $'upstream/${{ steps.safe-strings.outputs.head_ref}}' $'upstream/${{ steps.safe-strings.outputs.head_ref}}' + git checkout $'${{ steps.safe-strings.outputs.base_ref }}' + git checkout $'${{ steps.safe-strings.outputs.head_ref }}' - name: Create cm folder if: ${{ env.SHOULD_CHECKOUT == 'true' }}