I also would love to see this feature. Building on a push is great, but I also want to build on the merge commit that GitHub creates for every pull request (i.e. the head of the pr/<pull_request_id>/merge branch that GitHub creates). I understand it results in more load on CircleCI’s servers, but it seems important to test the actual result of merging a pull request, and not just the commit itself (which might be tens or hundreds of commits behind the target branch). There’s a real risk that even without merge conflicts, the tests may pass for the commit but fail once it is merged.
Additionally, I need this functionality in order to support a downstream build system I’ve pieced together using CircleCI’s experimental build parameters on their API. Without it, the process will only work if another push is made to the PR after it is opened.
It looks like this functionality has also been requested in several other threads:
We have added functionality to only run builds when a pull request is open. To enable this functionality you can navigate to “Advanced Settings” for your project and enable the “Only build pull requests” option.
This will still build your default branch, which typically is master. Does this sound like a proper solution to this issue in this thread?
Is there a way for circle to trigger a build on the branch specified by pull_request[“head”][“ref”] via https://developer.github.com/v3/activity/events/types/#pullrequestevent? If Circle can do that, and pass this along to my test script (maybe through ENV) I think this would be a good workaround since I can write the logic myself in the script to exit 0 immediately if its not a pullrequestevent.
Hi, our product team triages new features from the Feature Requests category here on Discuss. If the workarounds in this thread don’t deliver what you need, then I’d look through the feature request topic to see if someone has already requested this, and “heart” the post to show your support. If you can find one, then you can create one.