This repo contains Google Apps script to help manage GitHub notifications in your inbox. This repo is forked from https://github.com/jasonrudolph/OctoGAS, which is a fork of the original OctoGAS implentation https://github.com/btoews/OctoGAS.
NOTE: This fork of the script does not auto-manage labels. It is up to the user to create labels in their Gmail inbox that should be applied to messages.
Applies labels to incoming message threads for:
- Author of the Issue/Pull Request
- requires an
Author
label
- requires an
- Direct
@mentions
- requires a
Direct Mention
label
- requires a
- Team
@mentions
- requires a
Team
folder with labels like@myorg/myteam
for each team that should be matched
- requires a
- Watched repositories
- requires a
Repo
folder with lables like<owner>/<repo>
for each repository that should be matched
- requires a
- Meta notifications (added to team, SSH key added, etc...)
- reqires a
Meta
label
- reqires a
Archives the messages after applying the labels. Disabled by default. Enable by setting SHOULD_ARCHIVE
to true
.
Because Google Apps Scripts run on Google's infrastructure, you will need to set this script up to run on Google Scripts.
- Go to Google Scripts and add a new project
- Add a file to the new project with the contents from gmail-labler.gs
- Go to "Edit > Current Project's Triggers"
- Create a new trigger to run the
main
function ofgmail-labler.gs
however often you want. If you set it to run every minute you will hit a Google rate limit.