Git Tips #4 - Setup an Outlook rule to filter GitHub notifications
Ok, so not technically a Git tip, but as many people's experience of Git is using it with GitHub I decided to bend the rules and include it.
The List
The full list of my Git tips is here.
The Problem
I'm currently working on a project where we have a particularly noisy GitHub repro. I need to keep in the loop of what's happening with the project, but I don't want all those notifications filling up my inbox.
The Solution
I adapted Lyzi Diamond's Google Apps Script and turned it into an Outlook rule. Like Lyzi, I am using GitHub's custom mail headers to decide where my notifications should be filed.
My goal is to have notifications I should action or need to know about stay in my inbox. All the background noise can go into a folder and I'll catch up with those at my leisure.
The Outlook Rule
I couldn't find a way to export my rule, so I'll describe it here instead. The logic in the rule is to move all notifications from the noisy repo to a folder, except the ones you want to keep in your inbox.
This is the summary from the rules wizard in Outlook:
And this is the detail in the exceptions clause:
What else can I do?
GitHub adds several custom headers to its email notifications. One of these, X-GitHub-Reason
, states the reason you are receiving the notification. This is the full list of values for X-GitHub-Reason
from the GitHub API documentation:
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.
By altering the exceptions clause in your rule, you can decide which notifications to keep in your inbox, and which to move to a folder to read later.