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