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