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

Function createPR

github/index.ts:809–822  ·  view source on GitHub ↗
(base: string, branch: string, title: string, body: string)

Source from the content-addressed store, hash-verified

807}
808
809async function createPR(base: string, branch: string, title: string, body: string) {
810 console.log("Creating pull request...")
811 const { repo } = useContext()
812 const truncatedTitle = title.length > 256 ? title.slice(0, 253) + "..." : title
813 const pr = await octoRest.rest.pulls.create({
814 owner: repo.owner,
815 repo: repo.repo,
816 head: branch,
817 base,
818 title: truncatedTitle,
819 body,
820 })
821 return pr.data.number
822}
823
824function footer(opts?: { image?: boolean }) {
825 const { providerID, modelID } = useEnvModel()

Callers 1

index.tsFile · 0.70

Calls 3

useContextFunction · 0.85
createMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected