(head: string, base: string, title: string, description: string)
| 72 | export const disableMerge = () => toggleMerge(false); |
| 73 | |
| 74 | export const createPullRequest = async (head: string, base: string, title: string, description: string) => { |
| 75 | const octokit = initializeOctokit(); |
| 76 | |
| 77 | const goPullRequest = await go(() => |
| 78 | octokit.request(`POST /repos/${OWNER}/${REPOSITORY}/pulls`, { |
| 79 | owner: OWNER, |
| 80 | repo: REPOSITORY, |
| 81 | title, |
| 82 | body: description, |
| 83 | head, |
| 84 | base, |
| 85 | }) |
| 86 | ); |
| 87 | if (!goPullRequest.success) { |
| 88 | throw new Error(`Can't create a GitHub pull-request: ${goPullRequest.error}`); |
| 89 | } |
| 90 | |
| 91 | return goPullRequest.data.data.number as number; |
| 92 | }; |
| 93 | |
| 94 | export const requestPullRequestReview = async (pullRequestNumber: number) => { |
| 95 | const octokit = initializeOctokit(); |
nothing calls this directly
no test coverage detected