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

Method getStatuses

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

Source from the content-addressed store, hash-verified

805 }
806
807 async getStatuses(collectionName: string, slug: string) {
808 const contentKey = generateContentKey(collectionName, slug);
809 const branch = branchFromContentKey(contentKey);
810 const pullRequest = await this.getBranchPullRequest(branch);
811 const statuses = await this.getPullRequestStatuses(pullRequest);
812
813 return statuses.map(({ key, state, url }) => ({
814 context: key,
815 state:
816 state === BitBucketPullRequestStatusState.Successful
817 ? PreviewState.Success
818 : PreviewState.Other,
819 target_url: url,
820 }));
821 }
822
823 async getUnpublishedEntrySha(collection: string, slug: string) {
824 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