Skip to content

Commit 51bcdbf

Browse files
authored
fix: discussions url (#1582)
* fix: discussions url Signed-off-by: Adam Setch <[email protected]> * fix: discussions url lookup Signed-off-by: Adam Setch <[email protected]> * docs: add reference to open issue Signed-off-by: Adam Setch <[email protected]> --------- Signed-off-by: Adam Setch <[email protected]>
1 parent 1488146 commit 51bcdbf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/renderer/utils/helpers.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ export async function generateGitHubWebUrl(
123123
): Promise<Link> {
124124
const url = new URL(notification.repository.html_url);
125125

126+
// FIXME see #1583
127+
// Upstream GitHub API has started returning subject urls for Discussion notification types,
128+
// however these URLs are broken. Temporarily downgrading to use discussion lookup process.
129+
if (notification.subject.type === 'Discussion') {
130+
notification.subject.url = null;
131+
notification.subject.latest_comment_url = null;
132+
}
133+
126134
try {
127135
if (notification.subject.latest_comment_url) {
128136
url.href = await getHtmlUrl(

0 commit comments

Comments
 (0)