(opts = {})
| 421 | } |
| 422 | |
| 423 | async prCreate(opts = {}) { |
| 424 | const { |
| 425 | source: head, |
| 426 | target: base, |
| 427 | title, |
| 428 | description: body, |
| 429 | autoMerge |
| 430 | } = opts; |
| 431 | const { owner, repo } = ownerRepo({ uri: this.repo }); |
| 432 | const { pulls } = octokit(this.token, this.repo); |
| 433 | |
| 434 | const { |
| 435 | data: { html_url: htmlUrl, number } |
| 436 | } = await pulls.create({ |
| 437 | owner, |
| 438 | repo, |
| 439 | head, |
| 440 | base, |
| 441 | title, |
| 442 | body |
| 443 | }); |
| 444 | |
| 445 | if (autoMerge) |
| 446 | await this.prAutoMerge({ |
| 447 | pullRequestId: number, |
| 448 | mergeMode: autoMerge, |
| 449 | base |
| 450 | }); |
| 451 | return htmlUrl; |
| 452 | } |
| 453 | |
| 454 | /** |
| 455 | * @param {{ branch: string }} opts |
nothing calls this directly
no test coverage detected