MCPcopy Create free account
hub / github.com/angular/dev-infra / normalizeGithubStatusState

Function normalizeGithubStatusState

ng-dev/pr/common/fetch-pull-request.ts:270–281  ·  view source on GitHub ↗

Retrieve the normalized PullRequestStatus for the provided github status state.

(state: StatusState)

Source from the content-addressed store, hash-verified

268
269 /** A map of all of the statuses indexed by their names. */
270 const statusMap = new Map<string, PullRequestStatusInfo['statuses'][number]>();
271
272 statusCheckRollup.contexts.nodes
273 .sort((a, b) => {
274 const aTimestamp = Date.parse(a.completedAt || a.createdAt || '0');
275 const bTimestamp = Date.parse(b.completedAt || b.createdAt || '0');
276 return aTimestamp - bTimestamp;
277 })
278 .forEach((context) => {
279 switch (context.__typename) {
280 case 'CheckRun':
281 statusMap.set(`check:${context.name}`, {
282 type: 'check' as const,
283 name: context.name,
284 status: normalizeGithubCheckState(context.conclusion, context.status),

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected