We’re very happy to announce that we’ve made some big changes to how we process build triggers. We now support just triggering builds from Pull Requests!
Not only are builds triggering when you open, update, or merge a pull request, but we’ve also made sure you can adjust CodeShip to fit with your process around pull requests. You can find more information below as well as in our documentation.
Configuring Pull Request Build Options
To enable builds on pull requests, set your project to “Build only on pull request.”
This will also stop builds from regular commits, so you can focus just on your pull requests.
Once the builds from PRs are triggered, you’ll notice that the build element now shows the pull request number in addition to the usual details.
You will get a new build whenever someone raises a pull request, pushes a commit that updates an existing pull request, or merges the pull request. In the case of a merge, we’ll build the resulting commit that’s pushed into the target.
We didn’t stop at the UI though. If you want to use the pull request number or the URL to the pull request during your build, both are now available as environment variables (only for builds triggered by pull request events):
PR_NUMBER will be populated with the pull request number
CI_PULL_REQUEST will be populated with the URL of the pull request
By now you’re probably thinking “but what about” and we’ll love to hear what other cool things you’d like to be able to do.
We have a short-list of features lined up that will all make it easier to use CodeShip for open source projects (more on that in another post), which includes PRs from forked builds and building the potential merge of a PR, but if we’d like to hear from you what else we can do to make working with PRs easier.
Please send any feedback you have to firstname.lastname@example.org and if you’re interested we can set up a 1-on-1 to dive into the details of what you’re looking to do.