Wednesday, February 13, 2013

Automatically Building Pull Requests from GitHub with TeamCity

Inline image 3

Scenario

You’re running an OSS project* and someone makes a pull request. You’ve got two choices:
  • Merge and Pray
  • Pull to local branch, build, run tests and merge if all OK
What do you do? Well, what is it going to be?

I know what I’d like to do, and GitHub makes it so so tempting:

Inline image 1

But unfortunately I go with the second option.

That’s a pain, specially if you do a quick code-review and things look decent. Yet you still need to make sure that it builds and all tests pass.

Well, luckily for me, and my ability to continuously interfere in conversations, I found out that there is a better way. And what’s even nicer, is that it’s also possible with TeamCity.

*This applies to non-OSS too

Automatically Building All Pull Requests
What I want to do is have TeamCity automatically build all Pull Requests for me of my main repository, and notify me if it is successful. And I want this to happen without me having to configure every single fork as a repository in TeamCity, because like that, it wouldn’t be manageable. Here’s a diagram explaining it:

Read more: Hadi Hariri's Blog
QR: Inline image 2

Posted via email from Jasper-Net