From a184ab18d0b72d05498ba776f4093a109d004bca Mon Sep 17 00:00:00 2001 From: Prekshi Vyas Date: Fri, 10 Apr 2026 15:33:03 -0700 Subject: [PATCH] fix(ci): remove --depth=1 from legacy guard base fetch The fetch-depth: 0 checkout fetches full PR branch history, but git fetch origin main --depth=1 creates a shallow reference for origin/main with only 1 commit. This breaks git diff --name-status origin/main...HEAD because git can't find the merge base. Remove --depth=1 so origin/main has enough history to compute the three-dot diff against HEAD. Signed-off-by: Prekshi Vyas Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/legacy-path-guard.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/legacy-path-guard.yaml b/.github/workflows/legacy-path-guard.yaml index a8d82ed2513..8f46d6e9f02 100644 --- a/.github/workflows/legacy-path-guard.yaml +++ b/.github/workflows/legacy-path-guard.yaml @@ -29,7 +29,7 @@ jobs: run: npm install --ignore-scripts - name: Fetch base branch - run: git fetch origin "${{ github.base_ref }}" --depth=1 + run: git fetch origin "${{ github.base_ref }}" - name: Guard migrated legacy paths run: npm run ts-migration:guard -- --base "origin/${{ github.base_ref }}" --head HEAD