Good morning! Could you help me please with a valid flow to detect when a file on Github is modified?
I’m actually using the Github trigger with the pull_request event from the webhook but I’m not sure if that’s the best way. I give you a little explain:
With the pull_request event I have to wait to do a merge that actives the trigger and then from an url: https://github.com/CarupanoDev/HTML-CSS-PRACTICE/pull/21.diff I check if that particular file have modifications. This is my actual flow:
This is the expression that I use in the HTTP request to get the content of the diff property
This is the HTTP REQUEST result:
I use this last step to check with the IF node if the result from the HTTP node contents “swagger”. If true, the Github api makes a GET request to get the file swagger.sjon and finally sends an email with the file.
PD:
This is the event that I’m using on the Github trigger :
This works but I would like to know if exists a better approach.