Webhook for new pub key notifications?


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.

Any insight or suggestions folks?

Hi @amoebacowboy,

Thanks for being part of the GitHub Community Forum! We’re glad you’re here.

We don’t currently have this feature you are describing. Thanks for this feedback! We’re always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I’ve logged your feature request in our internal feature request list. Though I can’t guarantee anything or share a timeline for this, I can tell you that it’s been shared with the appropriate teams for consideration.

For now, you may want to check out our list of definitive webhooks we support today.

Please let me know if you have any other questions.

For more discussions like this and API topics, you may want to check out the  GitHub Platform Community