Expand description
The number of GitHub notifications
This block shows the unread notification count for a GitHub account. A GitHub personal access token with the “notifications” scope is required, and must be passed using the I3RS_GITHUB_TOKEN
environment variable or token
configuration option. Optionally the colour of the block is determined by the highest notification in the following lists from highest to lowest: critical
,warning
,info
,good
§Configuration
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $icon $total.eng(w:1) " |
interval | Update interval in seconds | 30 |
token | A GitHub personal access token with the “notifications” scope | None |
hide_if_total_is_zero | Hide this block if the total count of notifications is zero | false |
critical | List of notification types that change the block to the critical colour | None |
warning | List of notification types that change the block to the warning colour | None |
info | List of notification types that change the block to the info colour | None |
good | List of notification types that change the block to the good colour | None |
All the placeholders are numbers without a unit.
Placeholder | Value |
---|---|
icon | A static icon |
total | The total number of notifications |
assign | You were assigned to the issue |
author | You created the thread |
comment | You commented on the thread |
ci_activity | A GitHub Actions workflow run that you triggered was completed |
invitation | You accepted an invitation to contribute to the repository |
manual | You subscribed to the thread (via an issue or pull request) |
mention | You were specifically @mentioned in the content |
review_requested | You, or a team you’re a member of, were requested to review a pull request |
security_alert | GitHub discovered a security vulnerability in your repository |
state_change | You changed the thread state (for example, closing an issue or merging a pull request) |
subscribed | You’re watching the repository |
team_mention | You were on a team that was mentioned |
§Examples
[[block]]
block = "github"
format = " $icon $total.eng(w:1)|$mention.eng(w:1) "
interval = 60
token = "..."
[[block]]
block = "github"
token = "..."
format = " $icon $total.eng(w:1) "
info = ["total"]
warning = ["mention","review_requested"]
hide_if_total_is_zero = true
§Icons Used
github