Skip to content
Merged
Changes from 2 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
7 changes: 7 additions & 0 deletions src/renderer/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ export async function generateGitHubWebUrl(
): Promise<Link> {
const url = new URL(notification.repository.html_url);

// FIXME upstream GitHub API has started returning subject urls for Discussion notification types,
// however these URLs are broken. Temporarily downgrading to use discussion lookup process.
if (notification.subject.type === 'Discussion') {
notification.subject.url = null;
notification.subject.latest_comment_url = null;
}

try {
if (notification.subject.latest_comment_url) {
url.href = await getHtmlUrl(
Expand Down