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

Method getStatuses

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

Source from the content-addressed store, hash-verified

498 }
499
500 async getStatuses(collection: string, slug: string) {
501 const contentKey = generateContentKey(collection, slug);
502 const branch = branchFromContentKey(contentKey);
503 const pullRequest = await this.getBranchPullRequest(branch);
504 const statuses = await this.getPullRequestStatues(pullRequest);
505 return statuses.map(({ context, state, targetUrl }) => ({
506 context: context.name,
507 state: state === AzureCommitStatusState.SUCCEEDED ? PreviewState.Success : PreviewState.Other,
508 target_url: targetUrl,
509 }));
510 }
511
512 async getCommitItems(
513 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