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

Function pushToForkBranch

github/index.ts:747–759  ·  view source on GitHub ↗
(summary: string, pr: GitHubPullRequest)

Source from the content-addressed store, hash-verified

745}
746
747async function pushToForkBranch(summary: string, pr: GitHubPullRequest) {
748 console.log("Pushing to fork branch...")
749 const actor = useContext().actor
750
751 const remoteBranch = pr.headRefName
752
753 await assertGitIdentityConfigured()
754 await $`git add .`
755 await $`git commit -m "${summary}
756
757Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"`
758 await $`git push fork HEAD:${remoteBranch}`
759}
760
761async function branchIsDirty() {
762 console.log("Checking if branch is dirty...")

Callers 1

index.tsFile · 0.70

Calls 3

useContextFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected