MCPcopy Create free account
hub / github.com/decaporg/decap-cms / getBranchPullRequest

Method getBranchPullRequest

packages/decap-cms-backend-github/src/API.ts:604–617  ·  view source on GitHub ↗
(branch: string)

Source from the content-addressed store, hash-verified

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) {

Callers 9

APIClass · 0.95
getStatusesMethod · 0.95
getStatusesMethod · 0.45

Calls 3

getPullRequestsMethod · 0.95
withCmsLabelFunction · 0.85

Tested by

no test coverage detected