Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github hook for pull_request sent to AmazonSNS

I've seen (and tested) GitHub's integration with Amazon SNS. But, there doesn't appear to be a way to specify what events you want to hook (at least in the UI). Push works fine. Is there a way to hook a pull request and have it push an event to an sns topic?

Note: if there is documentation for this, I have not be able to find it. Please include a link with your answer.

like image 380
David S Avatar asked Mar 24 '26 14:03

David S


1 Answers

Complementing the OP's answer:

  • you need to get the amazon sns integration hook id through the list hooks endpoint (GET /repos/:owner/:repo/hooks)
  • once you have the corresponding id, you need to add/remove supported events through the edit a hook endpoint (PATCH /repos/:owner/:repo/hooks/:id)

I personally didn't know that integrations were treated as "usual" webhooks.

like image 127
BenFradet Avatar answered Mar 27 '26 05:03

BenFradet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!