This is a Google Apps Script that updates Gmail labels for GitHub notification mails based on their corresponding GitHub issue tracker labels.
- Go to script.google.com. It will automatically create a new script. Paste in this script from UpdateLabels.gs.
- Edit the CUSTOM_MAPPING variable to establish a mapping between GitHub issue labels and Gmail labels.
- Add the Gmail labels that you want to be marked as important in the MARK_IMPORTANT list. (note these are the Gmail labels and not the GitHub labels)
- Set either to use a strict_mode or not, if not using strict_mode: All other labels will be mapped as is under a project label.
- (Optional, but recommended) Create a GitHub access token and paste its value into the ACCESS_TOKEN variable. This will increase the rate limit on API calls.
- Name and save your script.
- Install a time-driven trigger by clicking on the clock button, clicking "Click here to add one now", and configuring how often you want the script to run.
I haven't had time to look at the way apps scripts are published to make this installable, and whether it could be configurable if it was installable.
I think the same approach could also be used to label mails from crbug and rietveld.