Created
July 13, 2025 17:33
-
-
Save luboszima/0a55806ee45011bd7686662b9f2fdcd1 to your computer and use it in GitHub Desktop.
glance wiget for Github Notifications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- type: custom-api | |
title: GitHub Notifications | |
url: https://api.github.com/notifications?all=true&per_page=20 | |
headers: | |
Authorization: Bearer ${GITHUB_TOKEN} | |
Accept: application/vnd.github+json | |
template: | | |
<ul class="list list-gap-14 collapsible-container" data-collapse-after="6"> | |
{{ range .JSON.Array "" }} | |
{{ if (.String "subject.url") }} | |
{{ | |
$notification := newRequest (.String "subject.url") | |
| withHeader "Authorization" "Bearer ${GITHUB_TOKEN}" | |
| getResponse | |
}} | |
<li> | |
<a href="{{ $notification.JSON.String "html_url" }}" class="size-title-dynamic color-primary-if-not-visited" target="_blank" rel="noreferrer">{{ .String "subject.title" }}</a> | |
<ul class="list-horizontal-text flex-nowrap"> | |
<li class="min-width-0" {{ .String "updated_at" | parseTime "rfc3339" | toRelativeTime }}></li> | |
<li class="min-width-0"><a target="_blank" href="https://github.com/{{ .String "repository.full_name" }}">{{ .String "repository.full_name" }}</a></li> | |
</ul> | |
</li> | |
{{ end }} | |
{{ end }} | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GITHUB_TOKEN
value will be your tokenThis widget is created to be part of small column.