banner

If you’re part of a GitHub project with massive activity, probably you already noticed that your inbox (or dedicated folder/label, if you’re a well-organized person) will be flooded.

And of course, this will make hard to find any mentions to your username (like mention in pull requests, code reviews, etc) or new notifications in issues you’re involved.

The way to fix this is to create 2 filters in Gmail:

  1. The Others filter: this filter will mark as read GitHub notifications that are not addressed to you and move them to the proper folder/label.

  2. The You filter: it will just move notifications that are addressed to you to this folder (i.e, they’ll be unread).

So, let’s assume these:

  • you know how to handle labels/folders and filters in Gmail
  • your GitHub account email is you@example.com
  • you have a label/folder in Gmail named Proj GitHub to receive all notifications
  • this GitHub project has 3 repositories: repo1, repo2 and repo3

Others filter

The first filter will match all the repositories names, avoid your email and mark all matching messages as read:

Matches: subject:([repo1] OR [repo2] OR [repo3]) -{cc:(you@example.com)}
Do this: Skip Inbox, Mark as read, Apply label "Proj GitHub"

As Gmail filters do not accepts wildcards, you have to include all the repositories in this filter (like above, I’ve include repo1, repo2 and repo3).

You filter

The second filter will be similar but with 2 small changes: it’ll match your email and it’ll not mark messages as read.

Matches: subject:([repo1] OR [repo2] OR [repo3]) cc:(you@example.com)
Do this: Skip Inbox, Apply label "Proj GitHub"

Any better idea?

I know, this is not the smartest way to solve this, but it’s effective. If you find any better way, please, share! :)