mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 23:14:13 +08:00
Compare commits
2 Commits
v0.0.34
...
claude/iss
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27a26b2e53 | ||
|
|
416f74d525 |
@@ -51,8 +51,9 @@ export async function setupBranch(
|
|||||||
|
|
||||||
const branchName = prData.headRefName;
|
const branchName = prData.headRefName;
|
||||||
|
|
||||||
// Execute git commands to checkout PR branch
|
// Execute git commands to checkout PR branch (shallow fetch for performance)
|
||||||
await $`git fetch origin ${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}`;
|
await $`git checkout ${branchName}`;
|
||||||
|
|
||||||
console.log(`Successfully checked out PR branch for PR #${entityNumber}`);
|
console.log(`Successfully checked out PR branch for PR #${entityNumber}`);
|
||||||
@@ -98,8 +99,8 @@ export async function setupBranch(
|
|||||||
sha: currentSHA,
|
sha: currentSHA,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Checkout the new branch
|
// Checkout the new branch (shallow fetch for performance)
|
||||||
await $`git fetch origin ${newBranch}`;
|
await $`git fetch origin --depth=1 ${newBranch}`;
|
||||||
await $`git checkout ${newBranch}`;
|
await $`git checkout ${newBranch}`;
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
Reference in New Issue
Block a user