File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed
src/renderer/utils/notifications/handlers Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ class DiscussionHandler extends DefaultHandler {
9494 }
9595
9696 defaultUrl ( notification : GitifyNotification ) : Link {
97- const url = new URL ( notification . repository . htmlUrl ) ;
97+ const url = new URL ( defaultHandler . defaultUrl ( notification ) ) ;
9898 url . pathname += '/discussions' ;
9999 return url . href as Link ;
100100 }
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ class IssueHandler extends DefaultHandler {
8585 }
8686
8787 defaultUrl ( notification : GitifyNotification ) : Link {
88- const url = new URL ( notification . repository . htmlUrl ) ;
88+ const url = new URL ( defaultHandler . defaultUrl ( notification ) ) ;
8989 url . pathname += '/issues' ;
9090 return url . href as Link ;
9191 }
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ class PullRequestHandler extends DefaultHandler {
9999 }
100100
101101 defaultUrl ( notification : GitifyNotification ) : Link {
102- const url = new URL ( notification . repository . htmlUrl ) ;
102+ const url = new URL ( defaultHandler . defaultUrl ( notification ) ) ;
103103 url . pathname += '/pulls' ;
104104 return url . href as Link ;
105105 }
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import type {
1313} from '../../../types' ;
1414import { getRelease } from '../../api/client' ;
1515import { isStateFilteredOut } from '../filters/filter' ;
16- import { DefaultHandler } from './default' ;
16+ import { DefaultHandler , defaultHandler } from './default' ;
1717import { getNotificationAuthor } from './utils' ;
1818
1919class ReleaseHandler extends DefaultHandler {
@@ -54,7 +54,7 @@ class ReleaseHandler extends DefaultHandler {
5454 }
5555
5656 defaultUrl ( notification : GitifyNotification ) : Link {
57- const url = new URL ( notification . repository . htmlUrl ) ;
57+ const url = new URL ( defaultHandler . defaultUrl ( notification ) ) ;
5858 url . pathname += '/releases' ;
5959 return url . href as Link ;
6060 }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type { OcticonProps } from '@primer/octicons-react';
44import { AlertIcon } from '@primer/octicons-react' ;
55
66import type { GitifyNotification , Link } from '../../../types' ;
7- import { DefaultHandler } from './default' ;
7+ import { DefaultHandler , defaultHandler } from './default' ;
88
99class RepositoryDependabotAlertsThreadHandler extends DefaultHandler {
1010 readonly type = 'RepositoryDependabotAlertsThread' ;
@@ -14,7 +14,7 @@ class RepositoryDependabotAlertsThreadHandler extends DefaultHandler {
1414 }
1515
1616 defaultUrl ( notification : GitifyNotification ) : Link {
17- const url = new URL ( notification . repository . htmlUrl ) ;
17+ const url = new URL ( defaultHandler . defaultUrl ( notification ) ) ;
1818 url . pathname += '/security/dependabot' ;
1919 return url . href as Link ;
2020 }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { FC } from 'react';
33import { MailIcon , type OcticonProps } from '@primer/octicons-react' ;
44
55import type { GitifyNotification , Link } from '../../../types' ;
6- import { DefaultHandler } from './default' ;
6+ import { DefaultHandler , defaultHandler } from './default' ;
77
88class RepositoryInvitationHandler extends DefaultHandler {
99 readonly type = 'RepositoryInvitation' ;
@@ -13,7 +13,7 @@ class RepositoryInvitationHandler extends DefaultHandler {
1313 }
1414
1515 defaultUrl ( notification : GitifyNotification ) : Link {
16- const url = new URL ( notification . repository . htmlUrl ) ;
16+ const url = new URL ( defaultHandler . defaultUrl ( notification ) ) ;
1717 url . pathname += '/invitations' ;
1818 return url . href as Link ;
1919 }
You can’t perform that action at this time.
0 commit comments