Third-party integrations can help you automate development work with Pull Requests and Issues on GitHub. Read our mini guide on why you should use them and which ones you should choose.
Why use third-party integrations?
GitHub has a really good UI/UX for working with Issues and Pull Requests in your repositories. If you’re either maintaining an open source project or working with a team on something commercial, you’ll want to take advantage of tools like CI, style checking or static code analysis. However, checking it yourself each time you or a teammate opens a Pull Request can be a real pain. The great news that all of this can be automated by the providers of these tools and their third-party integrations with GitHub!
Which third-party integrations are worth using?
It all depends on which tools are you are using to help you with development. I would like to describe a few that we use at Netguru.
With CircleCI integration, you can easily check the result of running tests on particular branches without visiting the CircleCI page. It is very useful while doing code reviews for your teammates.Oops, something went wrong here!
Hound does style checks and automatically comments on any issues.
Woof! Our style is fine!
Visiting Code Climate to see the results of your checks would be totally overkill during code review. Integrate with PR and just don’t even care as long as the result is fine!
GitHub can notify your project management tools about each new PR. What does this mean? For example, when you set up integration with JIRA or PivotalTracker - each new PR with a recognizable task name in its title will be automatically connected to the proper task. Great, isn’t it? A lot of automation can help track the progress of your project.
Actually, it turns out that most SaaS tools for developers give you third-party integration. The full list would be quite long, so I’ve covered only a few of these used by Netguru. I should definitely mention Jenkins, CodeShip, Percy, Scrutinizer… and tens of others!
So, how to set up third-party integration?
There are two ways to integrate different tools with your GitHub account. First, and easiest, is to use the Webhooks & Services tab in your repository settings and click on the Add service box.
When you choose the one that you want to integrate with, there is always an easy and straightforward list of steps that must be done to finish the integration. The select dropdown is very extensive - take a look to see the possibilities!
What if my integration isn’t listed there?
Don’t worry, you are not doomed! If the tool you want to integrate is ready for GitHub integration, but has not collaborated with GitHub to make the service integration work as previously described, you just need to set up a webhook on your GitHub repository with a proper URL which will be triggered on new Pull Request. Where should you take that payload URL from? From the tool’s documentation, of course!
When you get this URL, visit your repository settings; go to Webhooks & Services; click Add new and configure payload URL. Remember that you don’t want GitHub to notify your tool each time something is happening, but only on particular events - like a new Pull Request. To fix this, select Let me select individual events in the Which events would you like to trigger this webhook? pane in settings for the new webhook. Then select the checkboxes that you want your tool to take care of! That’s it!