Watch an entire GitHub repo, but only send notifications from specific GitHub users to your Gmail inbox.
Set up a Gmail label to archive all incoming repo notifications into. The script will watch that label and move threads that involve you or the specific GitHub users you whitelist back into your inbox.
Uses Google App Scripts.
This is a pain :)
- Watch a GitHub repo.
- Create a Gmail filter for the repo:
list:"{repo}.{organization_or_user}.github.com"
to archive all incoming messages (skip the inbox) and apply a label. - Go to https://script.google.com/.
- Make sure you're logged in as the user you want to be logged in as.
- Under "Create script for", click "Gmail".
- Paste the contents of
BubbleUpGitHubAccounts.gs
into the text editor. - Rename the file to
BubbleUpGitHubAccounts.gs
. - Edit the
gitHubAccounts
array to include all of the GitHub usernames you want to follow for this repo. - Edit the
gmailLabel
string to match the label you created in step 2 above. - You can test the script by selecting Run → main. The first run may take a while if there are already lots of threads in the Gmail label.
- Go to Resources → Current project's triggers
- Click "Add a new trigger".
- Run: main, Time-driven, minutes-timer, every 15 minutes.
- Click "notifications"
- Via email, hourly.
- OK.
- Save.
Will mark all non-matching threads as not important.