Distinguish cancelled PR checks from failures (#37789)

Show cancelled PR checks as Cancelled with separate counts on desktop and mobile, preserving genuine failures, pending checks, existing action permissions and older-client fallback. Carry complete provider summaries through caches and presentation; preserve Azure source completeness, folder attention priority and muted cancellation details.

Tracked in #15847 and STA-5102.
This commit is contained in:
Brennan Benson
2026-11-03 18:23:26 -08:00
committed by GitHub
parent 63df66d9b6
commit a9676ea6eb
139 changed files with 23705 additions and 20739 deletions
@@ -1,3 +1,4 @@
import { getProviderChecksOutcome } from '../provider-check-summary'
import type { CheckStatus, ProviderCheckSummary } from './pull-request-types'
import {
canShowGitHubPRAutoMergeControl,
@@ -41,7 +42,10 @@ export type GitHubPRMergeStateDecision = {
function checksState(item: GitHubPRMergeStateInput): CheckStatus | 'none' | undefined {
if (item.checksSummary) {
return item.checksSummary.state
const outcome = item.checksStatus
? getProviderChecksOutcome(item.checksSummary, item.checksStatus)
: getProviderChecksOutcome(item.checksSummary)
return outcome === 'cancelled' ? 'failure' : outcome
}
return item.checksStatus
}
+3
View File
@@ -53,6 +53,7 @@ export type PRInfo = {
state: PRState
url: string
checksStatus: CheckStatus
checksSummary?: ProviderCheckSummary
updatedAt: string
mergeable: PRMergeableState
reviewDecision?: PRReviewDecision | null
@@ -105,6 +106,8 @@ export type ProviderCheckSummary = {
total: number
passed: number
failed: number
/** Subset of failed; absent when cancellation detail is unavailable. */
cancelled?: number
pending: number
neutral: number
/** 'pipeline' when the state is a GitLab pipeline's own verdict, so its counts are not check counts. */