export function getGitHubCheckConclusion()

in scan/src/annotations.ts [200:216]


export function getGitHubCheckConclusion(
  annotations: Annotation[],
  failedByThreshold: boolean
): Conclusion {
  if (failedByThreshold) {
    return FAILURE_STATUS
  }
  const s = new Set(annotations.map(a => a.annotation_level))
  if (
    s.has(ANNOTATION_FAILURE) ||
    s.has(ANNOTATION_NOTICE) ||
    s.has(ANNOTATION_WARNING)
  ) {
    return NEUTRAL_STATUS
  }
  return SUCCESS_STATUS
}