diff --git a/src/renderer/utils/subject.test.ts b/src/renderer/utils/subject.test.ts index d2f42843f..9a2576c02 100644 --- a/src/renderer/utils/subject.test.ts +++ b/src/renderer/utils/subject.test.ts @@ -70,6 +70,20 @@ describe('renderer/utils/subject.ts', () => { }); }); + it('failed at startup check suite state', async () => { + const mockNotification = partialMockNotification({ + title: 'Demo workflow run failed at startup for main branch', + type: 'CheckSuite', + }); + + const result = await getGitifySubjectDetails(mockNotification); + + expect(result).toEqual({ + state: 'failure', + user: null, + }); + }); + it('multiple attempts failed check suite state', async () => { const mockNotification = partialMockNotification({ title: 'Demo workflow run, Attempt #3 failed for main branch', diff --git a/src/renderer/utils/subject.ts b/src/renderer/utils/subject.ts index cae5cdbfc..822566be2 100644 --- a/src/renderer/utils/subject.ts +++ b/src/renderer/utils/subject.ts @@ -92,6 +92,7 @@ function getCheckSuiteStatus(statusDisplayName: string): CheckSuiteStatus { case 'cancelled': return 'cancelled'; case 'failed': + case 'failed at startup': return 'failure'; case 'skipped': return 'skipped';