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

Method getStatuses

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

Source from the content-addressed store, hash-verified

1022 }
1023
1024 async getStatuses(collectionName: string, slug: string) {
1025 const contentKey = generateContentKey(collectionName, slug);
1026 const branch = branchFromContentKey(contentKey);
1027 const mergeRequest = await this.getBranchMergeRequest(branch);
1028 const statuses: GitLabCommitStatus[] = await this.getMergeRequestStatues(mergeRequest, branch);
1029 return statuses.map(({ name, status, target_url }) => ({
1030 context: name,
1031 state: status === GitLabCommitStatuses.Success ? PreviewState.Success : PreviewState.Other,
1032 target_url,
1033 }));
1034 }
1035
1036 async getUnpublishedEntrySha(collection: string, slug: string) {
1037 const contentKey = generateContentKey(collection, slug);

Callers 2

getDeployPreviewMethod · 0.45
API.spec.jsFile · 0.45

Calls 5

getBranchMergeRequestMethod · 0.95
generateContentKeyFunction · 0.90
branchFromContentKeyFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected