Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/renderer/utils/notifications/handlers/discussion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class DiscussionHandler extends DefaultHandler {
}

defaultUrl(notification: GitifyNotification): Link {
const url = new URL(notification.repository.htmlUrl);
const url = new URL(defaultHandler.defaultUrl(notification));
url.pathname += '/discussions';
return url.href as Link;
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/utils/notifications/handlers/issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class IssueHandler extends DefaultHandler {
}

defaultUrl(notification: GitifyNotification): Link {
const url = new URL(notification.repository.htmlUrl);
const url = new URL(defaultHandler.defaultUrl(notification));
url.pathname += '/issues';
return url.href as Link;
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/utils/notifications/handlers/pullRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class PullRequestHandler extends DefaultHandler {
}

defaultUrl(notification: GitifyNotification): Link {
const url = new URL(notification.repository.htmlUrl);
const url = new URL(defaultHandler.defaultUrl(notification));
url.pathname += '/pulls';
return url.href as Link;
}
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/utils/notifications/handlers/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type {
} from '../../../types';
import { getRelease } from '../../api/client';
import { isStateFilteredOut } from '../filters/filter';
import { DefaultHandler } from './default';
import { DefaultHandler, defaultHandler } from './default';
import { getNotificationAuthor } from './utils';

class ReleaseHandler extends DefaultHandler {
Expand Down Expand Up @@ -54,7 +54,7 @@ class ReleaseHandler extends DefaultHandler {
}

defaultUrl(notification: GitifyNotification): Link {
const url = new URL(notification.repository.htmlUrl);
const url = new URL(defaultHandler.defaultUrl(notification));
url.pathname += '/releases';
return url.href as Link;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { OcticonProps } from '@primer/octicons-react';
import { AlertIcon } from '@primer/octicons-react';

import type { GitifyNotification, GitifySubject, Link } from '../../../types';
import { DefaultHandler } from './default';
import { DefaultHandler, defaultHandler } from './default';

class RepositoryDependabotAlertsThreadHandler extends DefaultHandler {
readonly type = 'RepositoryDependabotAlertsThread';
Expand All @@ -14,7 +14,7 @@ class RepositoryDependabotAlertsThreadHandler extends DefaultHandler {
}

defaultUrl(notification: GitifyNotification): Link {
const url = new URL(notification.repository.htmlUrl);
const url = new URL(defaultHandler.defaultUrl(notification));
url.pathname += '/security/dependabot';
return url.href as Link;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { FC } from 'react';
import { MailIcon, type OcticonProps } from '@primer/octicons-react';

import type { GitifyNotification, GitifySubject, Link } from '../../../types';
import { DefaultHandler } from './default';
import { DefaultHandler, defaultHandler } from './default';

class RepositoryInvitationHandler extends DefaultHandler {
readonly type = 'RepositoryInvitation';
Expand All @@ -13,7 +13,7 @@ class RepositoryInvitationHandler extends DefaultHandler {
}

defaultUrl(notification: GitifyNotification): Link {
const url = new URL(notification.repository.htmlUrl);
const url = new URL(defaultHandler.defaultUrl(notification));
url.pathname += '/invitations';
return url.href as Link;
}
Expand Down