MCPcopy Index your code
hub / github.com/anomalyco/opencode / pushToForkBranch

Function pushToForkBranch

packages/opencode/src/cli/cmd/github.handler.ts:1106–1116  ·  view source on GitHub ↗
(summary: string, pr: GitHubPullRequest, commit: boolean)

Source from the content-addressed store, hash-verified

1104 }
1105
1106 async function pushToForkBranch(summary: string, pr: GitHubPullRequest, commit: boolean) {
1107 console.log("Pushing to fork branch...")
1108
1109 const remoteBranch = pr.headRefName
1110
1111 if (commit) {
1112 await gitRun(["add", "."])
1113 await commitChanges(summary, actor)
1114 }
1115 await gitRun(["push", "fork", `HEAD:${remoteBranch}`])
1116 }
1117
1118 async function branchIsDirty(originalHead: string, expectedBranch: string) {
1119 console.log("Checking if branch is dirty...")

Callers 1

github.handler.tsFile · 0.70

Calls 3

gitRunFunction · 0.85
commitChangesFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected