mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-28 22:03:30 +03:00
Fix bug always showing 0/n completed checks
This commit is contained in:
parent
867323cfee
commit
d9b37ee75b
@ -132,11 +132,11 @@
|
||||
function getChecksCount(status: ChecksStatus): string {
|
||||
if (!status) return 'Running checks';
|
||||
|
||||
const completed = status.completed || 0;
|
||||
const finished = status.finished || 0;
|
||||
const skipped = status.skipped || 0;
|
||||
const total = (status.totalCount || 0) - skipped;
|
||||
|
||||
return `Checks completed ${completed}/${total}`;
|
||||
return `Checks completed ${finished}/${total}`;
|
||||
}
|
||||
|
||||
function getChecksTagInfo(
|
||||
|
@ -381,6 +381,9 @@ export class GitHubService {
|
||||
const totalCount = resp?.data.total_count;
|
||||
|
||||
const success = queued == 0 && failed == 0 && skipped + succeeded == totalCount;
|
||||
const finished = checks.filter(
|
||||
(c) => c.conclusion && ['failure', 'success'].includes(c.conclusion)
|
||||
).length;
|
||||
|
||||
return {
|
||||
startedAt: firstStart,
|
||||
@ -389,7 +392,8 @@ export class GitHubService {
|
||||
completed,
|
||||
queued,
|
||||
totalCount,
|
||||
skipped
|
||||
skipped,
|
||||
finished
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,7 @@ export type ChecksStatus =
|
||||
queued?: number;
|
||||
totalCount?: number;
|
||||
skipped?: number;
|
||||
finished?: number;
|
||||
}
|
||||
| null
|
||||
| undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user