Show PR checks progress as error if any check has failed

This commit is contained in:
Mattias Granlund 2024-05-30 11:57:00 +02:00
parent 0d2024e7fa
commit c2f79818c8
3 changed files with 11 additions and 9 deletions

View File

@ -154,7 +154,7 @@
} }
return { return {
style: 'warning', style: status.failed > 0 ? 'error' : 'warning',
icon: 'spinner', icon: 'spinner',
text: getChecksCount(status) text: getChecksCount(status)
}; };

View File

@ -381,6 +381,7 @@ export class GitHubService {
startedAt: firstStart, startedAt: firstStart,
hasChecks: !!totalCount, hasChecks: !!totalCount,
success, success,
failed,
completed, completed,
queued, queued,
totalCount, totalCount,

View File

@ -60,14 +60,15 @@ export function parseGitHubDetailedPullRequest(
export type ChecksStatus = export type ChecksStatus =
| { | {
startedAt?: Date; startedAt: Date;
completed?: boolean; completed: boolean;
success?: boolean; success: boolean;
hasChecks?: boolean; hasChecks: boolean;
queued?: number; failed: number;
totalCount?: number; queued: number;
skipped?: number; totalCount: number;
finished?: number; skipped: number;
finished: number;
} }
| null | null
| undefined; | undefined;