(branch: string)
| 577 | } |
| 578 | |
| 579 | async getBranchPullRequest(branch: string) { |
| 580 | if (this.useOpenAuthoring) { |
| 581 | const pullRequests = await this.getPullRequests(branch, PullRequestState.All, () => true); |
| 582 | return this.getOpenAuthoringPullRequest(branch, pullRequests); |
| 583 | } else { |
| 584 | const pullRequests = await this.getPullRequests(branch, PullRequestState.Open, pr => |
| 585 | withCmsLabel(pr, this.cmsLabelPrefix), |
| 586 | ); |
| 587 | if (pullRequests.length <= 0) { |
| 588 | throw new EditorialWorkflowError('content is not under editorial workflow', true); |
| 589 | } |
| 590 | return pullRequests[0]; |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | async getPullRequestCommits(number: number) { |
| 595 | if (number === MOCK_PULL_REQUEST) { |
no test coverage detected