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

Function pushToNewBranch

packages/opencode/src/cli/cmd/github.handler.ts:1084–1095  ·  view source on GitHub ↗
(summary: string, branch: string, commit: boolean, isSchedule: boolean)

Source from the content-addressed store, hash-verified

1082 }
1083
1084 async function pushToNewBranch(summary: string, branch: string, commit: boolean, isSchedule: boolean) {
1085 console.log("Pushing to new branch...")
1086 if (commit) {
1087 await gitRun(["add", "."])
1088 if (isSchedule) {
1089 await commitChanges(summary)
1090 } else {
1091 await commitChanges(summary, actor)
1092 }
1093 }
1094 await gitRun(["push", "-u", "origin", branch])
1095 }
1096
1097 async function pushToLocalBranch(summary: string, commit: boolean) {
1098 console.log("Pushing to local branch...")

Callers 1

github.handler.tsFile · 0.70

Calls 3

gitRunFunction · 0.85
commitChangesFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected