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

Method getStatuses

packages/decap-cms-backend-azure/src/API.ts:494–504  ·  view source on GitHub ↗
(collection: string, slug: string)

Source from the content-addressed store, hash-verified

492 }
493
494 async getStatuses(collection: string, slug: string) {
495 const contentKey = generateContentKey(collection, slug);
496 const branch = branchFromContentKey(contentKey);
497 const pullRequest = await this.getBranchPullRequest(branch);
498 const statuses = await this.getPullRequestStatues(pullRequest);
499 return statuses.map(({ context, state, targetUrl }) => ({
500 context: context.name,
501 state: state === AzureCommitStatusState.SUCCEEDED ? PreviewState.Success : PreviewState.Other,
502 target_url: targetUrl,
503 }));
504 }
505
506 async getCommitItems(
507 files: { path: string; newPath?: string }[],

Callers 1

getDeployPreviewMethod · 0.45

Calls 5

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

Tested by

no test coverage detected