(branch: string)
| 605 | } |
| 606 | |
| 607 | async getBranchPullRequest(branch: string) { |
| 608 | if (this.useOpenAuthoring) { |
| 609 | const pullRequests = await this.getPullRequests(branch, PullRequestState.All, () => true); |
| 610 | return this.getOpenAuthoringPullRequest(branch, pullRequests); |
| 611 | } else { |
| 612 | const pullRequests = await this.getPullRequests(branch, PullRequestState.Open, pr => |
| 613 | withCmsLabel(pr, this.cmsLabelPrefix), |
| 614 | ); |
| 615 | if (pullRequests.length <= 0) { |
| 616 | throw new EditorialWorkflowError('content is not under editorial workflow', true); |
| 617 | } |
| 618 | return pullRequests[0]; |
| 619 | } |
| 620 | } |
| 621 | |
| 622 | async getPullRequestCommits(number: number) { |
| 623 | if (number === MOCK_PULL_REQUEST) { |
no test coverage detected