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 {
style: 'warning',
style: status.failed > 0 ? 'error' : 'warning',
icon: 'spinner',
text: getChecksCount(status)
};

View File

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

View File

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