From 27a26b2e531dc36c3b80c51d54026532bb88e253 Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Tue, 27 May 2025 15:39:11 -0700 Subject: [PATCH] fetch 50 commits for PRs --- src/github/operations/branch.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github/operations/branch.ts b/src/github/operations/branch.ts index 1998ed8..0f405cb 100644 --- a/src/github/operations/branch.ts +++ b/src/github/operations/branch.ts @@ -52,7 +52,8 @@ export async function setupBranch( const branchName = prData.headRefName; // Execute git commands to checkout PR branch (shallow fetch for performance) - await $`git fetch origin --depth=1 ${branchName}`; + // Fetch the branch with a depth of 20 to avoid fetching too much history, while still allowing for some context + await $`git fetch origin --depth=20 ${branchName}`; await $`git checkout ${branchName}`; console.log(`Successfully checked out PR branch for PR #${entityNumber}`);