Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/github/operations/branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* - For Issues: Create a new branch
*/

import { $ } from "bun";
import { $, spawn } from "bun";
import * as core from "@actions/core";
import type { ParsedGitHubContext } from "../context";
import type { GitHubPullRequest } from "../types";
Expand Down Expand Up @@ -54,7 +54,13 @@ export async function setupBranch(
);

// Execute git commands to checkout PR branch (dynamic depth based on PR size)
await $`git fetch origin --depth=${fetchDepth} ${branchName}`;
await spawn([
"git",
"fetch",
"origin",
`--depth=${fetchDepth}`,
branchName,
]).exited;
await $`git checkout ${branchName} --`;

console.log(`Successfully checked out PR branch for PR #${entityNumber}`);
Expand Down