(branch: string, commitMessage: string, status: string)
| 630 | } |
| 631 | |
| 632 | async createPullRequest(branch: string, commitMessage: string, status: string) { |
| 633 | const pr = { |
| 634 | sourceRefName: this.branchToRef(branch), |
| 635 | targetRefName: this.branchToRef(this.branch), |
| 636 | title: commitMessage, |
| 637 | description: DEFAULT_PR_BODY, |
| 638 | labels: [ |
| 639 | { |
| 640 | name: statusToLabel(status, this.cmsLabelPrefix), |
| 641 | }, |
| 642 | ], |
| 643 | }; |
| 644 | |
| 645 | await this.requestJSON({ |
| 646 | method: 'POST', |
| 647 | url: `${this.endpointUrl}/pullrequests`, |
| 648 | params: { |
| 649 | supportsIterations: false, |
| 650 | }, |
| 651 | body: JSON.stringify(pr), |
| 652 | }); |
| 653 | } |
| 654 | |
| 655 | async getBranchPullRequest(branch: string) { |
| 656 | const pullRequests = await this.getPullRequests(branch); |
no test coverage detected