There are some ways to do this:
- Set up a webhook for PullRequestEvent. It sends POST request to your server with essential information about PR, so you can run builder(s) if request is received - Proper way.
- Take a look on GitHub API. It allows you receive information about each pull requests by demand (e.g.
curl https://api.github.com/repos/Itseez/opencv/pulls/604
).
So, you can periodically examine PR's statuses, and if they have been recently updated (field updated_at
in response) run the builders - Tricky, but fast to implement solution.