How to filter emails from GitHub in Gmail and flag them with labels.
The labels in this document are just examples.
Filter | Label |
---|---|
from:([email protected]) subject:"PR \#" |
gh-pull-request |
Note: special characters like (
or #
are ignored and the escape \
doesn't work.
Filter | Label |
---|---|
from:([email protected]) |
gha |
Filter | Label |
---|---|
from:([email protected]) subject:"\(Discussion \#) |
gh-discussion |
Filter | Label |
---|---|
from:([email protected]) "Visit the release page to download them." |
gh-relases |
Filter | Label |
---|---|
from:([email protected]) cc:([email protected]) |
gh-assignments |
Filter | Label |
---|---|
from:([email protected]) cc:([email protected]) |
gh-mentions |
Filter | Label |
---|---|
from:([email protected]) cc:([email protected]) "requested your review on" |
gh-review-requested |
subscribed
: The notification arrived because you’re watching the repository.manual
: The notification arrived because you’ve specifically decided to subscribe to the thread (via an Issue or Pull Request).author
: The notification arrived because you’ve created the thread.comment
: The notification arrived because you’ve commented on the thread.mention
: The notification arrived because you were specifically @mentioned in the content.team_mention
: The notification arrived because you were on a team that was mentioned (like @org/team).state_change
: The notification arrived because you changed the thread state (like closing an Issue or merging a Pull Request).assign
: The notification arrived because you were assigned to the Issue.review_requested
: The notification arrived because your review is required.ci_activity
: The notification arrived because CI activities (failure, success, ...)push
: The notification arrived because of a push
example:
WARNING: Those rules can produce false-positives.
label: gh-closed
Filter:
from:([email protected]) "Closed \#"
Note: special characters like (
or #
are ignored and the escape \
doesn't work.
label: gh-merged
Filter:
from:([email protected]) "Merged \#"
Note: special characters like (
or #
are ignored and the escape \
doesn't work.
label: gh-issue
since 2021-10-11
Filter:
from:([email protected]) subject:("Issue \#" -"PR \#")
Note: special characters like (
or #
are ignored and the escape \
doesn't work.
- http://radek.io/2015/06/07/5-useful-gmail-filters-for-github-users/
- http://lyzidiamond.com/posts/github-notifications-google-script
- http://126kr.com/article/8t3endsbz2q
- https://developer.github.com/v3/activity/notifications/#notification-reasons
- https://support.google.com/mail/answer/7190?hl=en
- https://maximevaillancourt.com/blog/github-email-notifications-gmail-filters
- https://github.blog/changelog/2021-10-11-improved-notification-email-titles-for-issues-and-prs/
Great work. Implemented in my own gmail setup :)