Retrieve the normalized PullRequestStatus for the provided github check state.
( conclusion: CheckConclusionState | null, status: CheckStatusState, )
| 282 | type: 'check' as const, |
| 283 | name: context.name, |
| 284 | status: normalizeGithubCheckState(context.conclusion, context.status), |
| 285 | }); |
| 286 | break; |
| 287 | case 'StatusContext': |
| 288 | statusMap.set(`status:${context.context!}`, { |
| 289 | type: 'status' as const, |
| 290 | name: context.context!, |
| 291 | status: normalizeGithubStatusState(context.state!), |
| 292 | ...(context.description ? {description: context.description} : {}), |
| 293 | }); |
| 294 | break; |
| 295 | } |
| 296 | }); |
| 297 | |
| 298 | return { |
| 299 | combinedStatus: normalizeGithubStatusState(statusCheckRollup.state), |
| 300 | statuses: Array.from(statusMap.values()), |
| 301 | }; |
| 302 | } |
| 303 | |
| 304 | /** Retrieve the normalized PullRequestStatus for the provided github status state. */ |
| 305 | function normalizeGithubStatusState(state: StatusState): PullRequestStatus { |
| 306 | switch (state) { |
| 307 | case 'FAILURE': |
| 308 | case 'ERROR': |
| 309 | return PullRequestStatus.FAILING; |
no outgoing calls
no test coverage detected