(base: string, branch: string, title: string, body: string)
| 807 | } |
| 808 | |
| 809 | async 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 | |
| 824 | function footer(opts?: { image?: boolean }) { |
| 825 | const { providerID, modelID } = useEnvModel() |
no test coverage detected