January 13, 2014 Johannes Schmitt schmittjoh

Pull Request Support for Patches

Today, I wanted to talk about a new feature which I personally love very much. So far, Scrutinizer provided you with the ability to merge automated fixes via the command line; this is still possible and the command looks something like this:

curl https://scrutinizer-ci.com/.../inspection.diff | git apply -

However, for simple fixes like coding style issues and typos, we can do even better and make this process as smooth and fast as possible. Just like GitHub has an edit UI which allows you to propose and merge simple fixes entirely through the webinterface, Scrutinizer can now also send you a pull request for these coding style patches:

UI for requesting pull requests
Note: If the patch contains things you do not like, you can also remove these changes through the webinterface before requesting the pull request. If you find bugs in the generated patch, it’s of course appreciated if you also let us know so we can fix them.

Integrates with the GitHub Workflow

This also integrates well with the GitHub workflow. Everyone who has used GitHub knows what a pull request is, however did you know that you can send pull requests to pull requests? Let’s take a look at an example:

Pull-Request to Pull-Request Example

In this example, Bob opens a pull request on the main repository. Alice reviews this pull request. What she can do now is to comment on the pull request, and what she also can do is to actually send some fixes to Bob’s repository which he can merge into his pull request.

Scrutinizer offers you that option too. If you are in Bob’s shoes, you might want to merge the auto-fixes into your pull request. If you are the maintainer on the other hand, you might want to have Scrutinizer send the fixes directly to the main repository. Scrutinizer allows you to choose between both options.

 

Have Feedback? Tweet to @scrutinizerci

If you experienced a bug or have any questions, please send them to [email protected].