feat: List Github notifications
This commit is contained in:
14
src/notification.ts
Normal file
14
src/notification.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Notification } from "./types";
|
||||
|
||||
export function getNotificationHtmlUrl(notification: Notification) {
|
||||
switch (notification.details?.type) {
|
||||
case "GithubPullRequest":
|
||||
return notification.details.content.url;
|
||||
case "GithubDiscussion":
|
||||
return notification.details.content.url;
|
||||
default: {
|
||||
// TODO
|
||||
return "https://github.com";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user