(branch: string, commitMessage: string, status: string)
| 563 | } |
| 564 | |
| 565 | async createPullRequest(branch: string, commitMessage: string, status: string) { |
| 566 | const pullRequest: BitBucketPullRequest = await this.requestJSON({ |
| 567 | method: 'POST', |
| 568 | url: `${this.repoURL}/pullrequests`, |
| 569 | headers: { 'Content-Type': APPLICATION_JSON }, |
| 570 | body: JSON.stringify({ |
| 571 | title: commitMessage, |
| 572 | source: { |
| 573 | branch: { |
| 574 | name: branch, |
| 575 | }, |
| 576 | }, |
| 577 | destination: { |
| 578 | branch: { |
| 579 | name: this.branch, |
| 580 | }, |
| 581 | }, |
| 582 | description: DEFAULT_PR_BODY, |
| 583 | close_source_branch: true, |
| 584 | }), |
| 585 | }); |
| 586 | // use comments for status labels |
| 587 | await this.addPullRequestComment(pullRequest, statusToLabel(status, this.cmsLabelPrefix)); |
| 588 | } |
| 589 | |
| 590 | async getDifferences(source: string, destination: string = this.branch) { |
| 591 | if (source === destination) { |
no test coverage detected