From bcae7ce20e3d1e481016f6869c7152416af8caaa Mon Sep 17 00:00:00 2001 From: Sasa Junuzovic Date: Tue, 17 Mar 2026 12:18:18 -0700 Subject: [PATCH] fix: orchestrator rebase fetch creates proper remote ref git fetch origin BRANCH doesn't create origin/BRANCH tracking ref, causing 'not a commit' error on checkout. Fixed by explicitly mapping the fetch to refs/remotes/origin/BRANCH. Part of #135 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/pipeline-orchestrator.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pipeline-orchestrator.yml b/.github/workflows/pipeline-orchestrator.yml index 673542a..8ca611f 100644 --- a/.github/workflows/pipeline-orchestrator.yml +++ b/.github/workflows/pipeline-orchestrator.yml @@ -218,13 +218,13 @@ jobs: echo " Attempting rebase of $BRANCH onto main..." - # Fetch latest and attempt rebase - git fetch origin main "$BRANCH" || { + # Fetch latest refs for main and the PR branch + git fetch origin main "$BRANCH":"refs/remotes/origin/$BRANCH" || { echo " ⚠️ PR #${PR}: Failed to fetch branch. Skipping." echo "::endgroup::" continue } - git checkout -B "$BRANCH" -- "origin/$BRANCH" + git checkout -B "$BRANCH" "origin/$BRANCH" if git rebase origin/main; then # Rebase succeeded — force push