By Matt Ferrante, Senior Software Engineer in Test
We have released our github-pr CLI utility for public use. GitHub is an amazing service that has allowed us to automate the triggering of builds, tests and deployments. The github-pr tool was developed to alleviate the bottleneck of manual intervention when it came to multiple varied interactions with pull requests. It has also been helpful for CLI gurus who prefer to have information (especially in aggregate) in their terminal instead of in a UI.
The Release Engineering Team at DataXu developed this tool so our Jenkins build/test/deploy infrastructure can do the following:
- report back to pull requests on multiple build/test results
- merge open pull requests for testing integrated changes before merging to master
- add/remove/replace labels to pull requests so we can organize and know the scope of a change without having to dig in
Pull requests that are passing automated build/test(s) (and blessed by a developer’s “:shipit:”) are automatically labeled with an “int_ready” label. A nightly job using github-pr looks up all pull requests that are labeled “int_ready” and merges them (using github-pr) into a new integration branch off of master, e.g. int-1234. We run this integration branch through all available unit, integration, and end-to-end tests. Comments are automatically made to the pull requests (using github-pr), indicating the tests that have run. Upon a successful run, the original pull requests are merged to master (again using github-pr). If there is a failure, the “int_ready” label is removed (using github-pr), nothing is merged, and the pull request owners are notified by email. This process is repeated nightly to add velocity and ensure we keep our master branch in good shape.
We invite you to investigate the code and use it. It’s currently hosted on github and is licensed using the New BSD license, the most “open” open source license out there. If you have ideas to improve our github-pr script or find issues, please post them to the github issues page seen here: https://github.com/dataxu/github-pr/issues.