[users at bb.net] Triggering Gitpoller on Pull Request

Chris Spencer chrisspen at gmail.com
Thu Jan 7 16:36:07 UTC 2016


How do you trigger a build when a pull request is created?

I'm trying to create a custom notifier that auto-declines pull requests if
the build fails. I was planning to implement this similar to the built-in
`mail.Notifier`, and use Github/Bitbucket's API to lookup the build's
branch ID in the list of open pull requests.

However, I'm finding that Gitpoller only triggers a build for a normal
commit, not when a pull request is created. Depending on how fast the user
creates their pull request vs how quickly the build fails, this creates a
possible race condition like:

1. user commits their branch
2. buildbot detects commit and begins the build
3a. user creates pull request
3b. buildbot finishes build and checks Github/Bitbucket for open pull
request

Events 3a and 3b may or may not happen in that order. Ideally, 3a happens
before 3b, but if the user is slow to create their pull request after their
commit, and something in their commit causes the build to fail early,
Buildbot will go to check for the pull request and find nothing. How do I
prevent this from happening?

Regards,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160107/1dbc1bac/attachment.html>


More information about the users mailing list