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

Method getStatuses

packages/decap-cms-backend-bitbucket/src/API.ts:824–838  ·  view source on GitHub ↗
(collectionName: string, slug: string)

Source from the content-addressed store, hash-verified

822 }
823
824 async getStatuses(collectionName: string, slug: string) {
825 const contentKey = generateContentKey(collectionName, slug);
826 const branch = branchFromContentKey(contentKey);
827 const pullRequest = await this.getBranchPullRequest(branch);
828 const statuses = await this.getPullRequestStatuses(pullRequest);
829
830 return statuses.map(({ key, state, url }) => ({
831 context: key,
832 state:
833 state === BitBucketPullRequestStatusState.Successful
834 ? PreviewState.Success
835 : PreviewState.Other,
836 target_url: url,
837 }));
838 }
839
840 async getUnpublishedEntrySha(collection: string, slug: string) {
841 const contentKey = generateContentKey(collection, slug);

Callers 2

getDeployPreviewMethod · 0.45
api.spec.jsFile · 0.45

Calls 5

getBranchPullRequestMethod · 0.95
generateContentKeyFunction · 0.90
branchFromContentKeyFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected