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/** Retrieve the normalized PullRequestStatus for the provided github status state. */
270function normalizeGithubStatusState(state: StatusState): PullRequestStatus {
271 switch (state) {
272 case 'FAILURE':
273 case 'ERROR':
274 return PullRequestStatus.FAILING;
275 case 'PENDING':
276 return PullRequestStatus.PENDING;
277 case 'SUCCESS':
278 case 'EXPECTED':
279 return PullRequestStatus.PASSING;
280 }
281}
282
283/** Retrieve the normalized PullRequestStatus for the provided github check state. */
284function normalizeGithubCheckState(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected