GitHub Web Hooks documentation #24312
-
Where can I find documentation to triggering webhooks when a comment is created on a PR? Also, where is it explained that a PR is just an issue with code? I just finished 3 hours long search for how to send a GitHub webhook when a comment is created on a PR. I believe I searched the Webhooks documentation through and through, and nowhere, is any mention about the fact that comments on a PR actually trigger the I believe there has to be more information about that fact than that short sentence. There is no way you mention that “a Pull Request is just an Issue with code” only once. Mainly, if the documentation itself states “This may seem counterintuitive at first.”. Also, sorry for being too hostile, but I feel exhasted after searching for such a simple thing for so long, and the authors themselves acknowledged that it is counterintuitive. Yet, they never explained the reasons for it, nor was that information easy to find. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey @vladmasarik, Thanks for being here, and thanks for taking the time to write this feedback. I can see how is very frustrating to not be able to find clear documentation. Let me see if I can help clarify some of your questions and rest assured I’ll pass on your feedback to our docs team. Here is a link to the current docs for our Webhooks product (https://developer.github.com/webhooks/). These are configured at repository level and the principal is that you can subscribe to events that happen in the given repository and receive a payload representing this, which you can then process as you see fit, storing the data locally or triggering some desired behavior. When you create a hook you designate a URL for this hook. This has to be a publicly exposed endpoint that can receive POST requests. Once you have this you can then configure your hook to either receive form-encoded POST data, or JSON encoded POST data. Finally, you pick the events that you’d like to subscribe to this hook to. When an event occurs, such as a push or triggered when a pull request is https://developer.github.com/v3/activity/events/types/#pushevent
If the event has multiple actions, for instance an issue event might have an event for created, updated, a new label being added etc. Then there is an action key in this payload that denotes what action triggered this event. Once you receive this it’s up to you how you decide to process this, for instance, you might store this in a db or key/value no-db store, you might decide to store all of the data, or just what you need for your personal site - the choice is entirely yours. I hope this helps, and if you have any further questions feel free to reach out. |
Beta Was this translation helpful? Give feedback.
-
Thanks for so useless answer. This doesn’t help even a bit. I think you misread the OP’s problem completely.
|
Beta Was this translation helpful? Give feedback.
Hey @vladmasarik,
Thanks for being here, and thanks for taking the time to write this feedback. I can see how is very frustrating to not be able to find clear documentation. Let me see if I can help clarify some of your questions and rest assured I’ll pass on your feedback to our docs team.
Here is a link to the current docs for our Webhooks product (https://developer.github.com/webhooks/). These are configured at repository level and the principal is that you can subscribe to events that happen in the given repository and receive a payload representing this, which you can then process as you see fit, storing the data locally or triggering some desired behavior.
When you create a hook you…