Skip to content

Commit 32eb1e0

Browse files
committed
Merge branch 'main' into refactor/fetch-issue-graphql
Signed-off-by: Adam Setch <[email protected]>
1 parent 6b35fc2 commit 32eb1e0

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/renderer/utils/notifications/handlers/checkSuite.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,25 +199,25 @@ describe('renderer/utils/notifications/handlers/checkSuite.ts', () => {
199199
it('iconColor', () => {
200200
expect(
201201
checkSuiteHandler.iconColor(
202-
createMockSubject({ type: 'CheckSuite', state: 'success' }),
202+
createMockSubject({ type: 'CheckSuite', state: 'SUCCESS' }),
203203
),
204204
).toBe(IconColor.GREEN);
205205

206206
expect(
207207
checkSuiteHandler.iconColor(
208-
createMockSubject({ type: 'CheckSuite', state: 'failure' }),
208+
createMockSubject({ type: 'CheckSuite', state: 'FAILURE' }),
209209
),
210210
).toBe(IconColor.RED);
211211

212212
expect(
213213
checkSuiteHandler.iconColor(
214-
createMockSubject({ type: 'CheckSuite', state: 'cancelled' }),
214+
createMockSubject({ type: 'CheckSuite', state: 'CANCELLED' }),
215215
),
216216
).toBe(IconColor.GRAY);
217217

218218
expect(
219219
checkSuiteHandler.iconColor(
220-
createMockSubject({ type: 'CheckSuite', state: 'skipped' }),
220+
createMockSubject({ type: 'CheckSuite', state: 'SKIPPED' }),
221221
),
222222
).toBe(IconColor.GRAY);
223223

src/renderer/utils/notifications/handlers/default.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ describe('renderer/utils/notifications/handlers/default.ts', () => {
3737

3838
describe('iconColor', () => {
3939
it('returns GRAY for any state (fallback behavior)', () => {
40-
const states: Array<StateType | null | undefined> = [
41-
'unknown' as StateType,
40+
const states: Array<GitifyNotificationState | null | undefined> = [
41+
'unknown' as GitifyNotificationState,
4242
null,
4343
undefined,
4444
];

src/renderer/utils/notifications/handlers/issue.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ class IssueHandler extends DefaultHandler {
6666
}
6767

6868
iconColor(subject: Subject): IconColor {
69-
switch (subject.state) {
70-
case 'open':
71-
case 'reopened':
69+
switch (subject.state as GitifyIssueState) {
70+
case 'OPEN':
71+
case 'REOPENED':
7272
return IconColor.GREEN;
73-
case 'closed':
73+
case 'CLOSED':
7474
return IconColor.RED;
75-
case 'completed':
75+
case 'COMPLETED':
7676
return IconColor.PURPLE;
7777
default:
7878
return defaultHandler.iconColor(subject);

0 commit comments

Comments
 (0)