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

Method getStatuses

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

Source from the content-addressed store, hash-verified

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