MCPcopy Create free account
hub / github.com/anomalyco/opencode / checkoutLocalBranch

Function checkoutLocalBranch

github/index.ts:691–699  ·  view source on GitHub ↗
(pr: GitHubPullRequest)

Source from the content-addressed store, hash-verified

689}
690
691async function checkoutLocalBranch(pr: GitHubPullRequest) {
692 console.log("Checking out local branch...")
693
694 const branch = pr.headRefName
695 const depth = Math.max(pr.commits.totalCount, 20)
696
697 await $`git fetch origin --depth=${depth} ${branch}`
698 await $`git checkout ${branch}`
699}
700
701async function checkoutForkBranch(pr: GitHubPullRequest) {
702 console.log("Checking out fork branch...")

Callers 1

index.tsFile · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected