I’m trying to figure out a way to trigger pipelines when a GitHub pull request is approved. Is what I am trying to do possible? I see there is a custom trigger event type in the docs however can’t find any documentation on how to use it.
the “custom” trigger event type is used when you trigger a build via the API (Build Create | Drone)
Drone only processes pull request events where the action is opened or synchronized. All other pull request actions are ignored and I’m afraid enabling more actions would be a breaking change for the majority of users that would not expect pipelines to run for additional actions, so unfortunately I do not have an immediate solution to offer you.
Hi @bradrydzewski from github’s POV, Pull request approvals are a different payload/event setup. The event name is:
Link: Webhook events and payloads - GitHub Docs
Would this really be a breaking change if it’s supported.
We could potentially namespace it with github so it does not collide with other git providers. Eg:
Happy to open a PR to add this to upstream.
Drone automatically executes pipelines for all event types (pull request, push and tag) unless you explicitly configure it to include or exclude a subset of events. For example, if you only want to execute a pipeline for push events it must be explicitly configured in the trigger section like this:
or like this:
This means if we add support for github_pull_request_review events, for many existing projects, pipelines would begin to automatically execute for github_pull_request_review events. The sudden execution of pipelines for a new event type would be unexpected and undesired for most of our users, which is why we would consider this a breaking change.
It is probably fair to say that we may need to rethink how we trigger pipelines, however, that would likely lead to breaking changes as well. This is definitely something we can consider for the future, when we are ready to make a breaking release.
Ah I see what you mean now.
I’ll have to build something on the side that receives the github event, and rerun the drone build that failed as long as the pr numbers match.
Thanks for the quick response. I appreciate it.