Module i3status_rs::blocks::github

source ·
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

KeyValuesDefault
formatA string to customise the output of this block. See below for available placeholders." $icon $total.eng(w:1) "
intervalUpdate interval in seconds30
tokenA GitHub personal access token with the “notifications” scopeNone
hide_if_total_is_zeroHide this block if the total count of notifications is zerofalse
criticalList of notification types that change the block to the critical colourNone
warningList of notification types that change the block to the warning colourNone
infoList of notification types that change the block to the info colourNone
goodList of notification types that change the block to the good colourNone

All the placeholders are numbers without a unit.

PlaceholderValue
iconA static icon
totalThe total number of notifications
assignYou were assigned to the issue
authorYou created the thread
commentYou commented on the thread
ci_activityA GitHub Actions workflow run that you triggered was completed
invitationYou accepted an invitation to contribute to the repository
manualYou subscribed to the thread (via an issue or pull request)
mentionYou were specifically @mentioned in the content
review_requestedYou, or a team you’re a member of, were requested to review a pull request
security_alertGitHub discovered a security vulnerability in your repository
state_changeYou changed the thread state (for example, closing an issue or merging a pull request)
subscribedYou’re watching the repository
team_mentionYou 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

Structs§

Functions§