Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:(notifications@github.com) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}

label: gh-pull-request

Assignments

from:(notifications@github.com) cc:(assign@noreply.github.com)

label: gh-assignments

Mentions

from:(notifications@github.com) cc:(mention@noreply.github.com)

label: gh-mentions

Review Requested

from:(notifications@github.com) {cc:(review_requested@noreply.github.com) "requested your review on"}

label: gh-review-requested

GitHub emails

  • 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.

example:

Approximate rules

Closed (~)

from:(notifications@github.com) "Closed \#"

label: gh-closed

Merged (~)

from:(notifications@github.com) "Merged \#"

label: gh-merged

Issue (~)

from:(notifications@github.com) "What did you expect to see?"

label: gh-issue

References

@lizozom

This comment has been minimized.

Copy link

lizozom commented Apr 14, 2019

Great work. Implemented in my own gmail setup :)

@insipx

This comment has been minimized.

Copy link

insipx commented Apr 19, 2019

Awesome! This should make github notifications much easier to deal with in my email.

Also, keep in mind you can keep multiple Emails in Github and assign different emails to receive notifications based on a Github Organization. Useful if you like to alias multiple emails to handle different categories of mail

@insipx

This comment has been minimized.

Copy link

insipx commented Jul 31, 2019

Anyone know if there is a good way to filter for releases only?

@fatmcgav

This comment has been minimized.

Copy link

fatmcgav commented Sep 20, 2019

Note that it's possible to get "false positives" on the Merged search above...

Using from:(notifications@github.com) "merged AROUND 1 into" gives better results :)

@EasyAsABC123

This comment has been minimized.

Copy link

EasyAsABC123 commented Sep 26, 2019

Perhaps utilizing regex instead of hardcoding numbers? Example: from:(notifications@github.com) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed /d+ commit."}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.