I’d like to setup a webhook to send the “new public key was added to X” email notification that owners get to slack to enable some automation(s). The issue I’m running into as, as that email notification can’t be opted out of, I’m having problems locating the eventID or trigger generating the email (or the right API documentation for this) so I can setup directing it to slack in some manner. As a “built-in non-opt out feature” maybe it was decided it didn’t need to be documented somewhere?
The end goal is something like this:
When a new key is added to GitHub, a notification is sent out, currently by email. I want to design a solution for something like the following:
- Push the alert via webhook
- Webhook pushed to a listener process that is a Slack bot
- Have the Slack bot ping the user on Slack who added the key and ask them to validate they indeed added the key
- If they say no, disable the key and send an alert to someone.
- On a regular basis, send out the list of all Deploy Keys across all repos to validate they are all still needed. (This one I already have solved as it is well documented)
I feel like I’m missing something obvious.