By using our HipChat integration, Code Climate will automatically post notifications directly to your HipChat room. Notifications will be posted whenever important events occur during our analysis (e.g., your code or test coverage gets better or worse). Here are some examples of notifications we'll post in HipChat:
- An area of your codebase increases from a D or F to any other grade. For example, from a D to an A.
- An area of your codebase decreases to a D or F from any other grade. For example, from a B to an F.
- New code is added to your codebase and its initial grade is a D or F.
- Test coverage improves or declines.
Note: For an organization-owned repository, you must be in an organization's Owners group to perform the actions described in this article. Alternatively, if you added the repository in question by clicking Add Open Source Repo, you must have GitHub-rights to administer the repository.
The steps below explain how to setup and test Code Climate's HipChat integration. Note that these steps will require you to move back and forth between Code Climate and HipChat.
- In your HipChat Group Admin area, click API from the top navigation.
Make sure you create a token in HipChat's Group Admin area
- The url should look like:
- Create an API token for the Code Climate service. Scroll down to the Create New Token section and select Notification as the Type.
- Create a Label for the API token (e.g. Code Climate).
- Click Create.
- Copy the generated API token to your clipboard.
- In a new browser window, navigate to your Code Climate Dashboard.
- Mouse over your repository's name and click Settings.
- Select the Integrations tab.
- Next to HipChat, click Set Up.
- Paste the API token into the Auth Token field.
- Back in HipChat, click the Rooms tab on the top navigation.
- Click the name of the room that you would like Code Climate to post to.
- Copy the API ID number.
- Back in Code Climate, paste the room ID into the Room field.
- Ensure Active is checked and click Save.
Note: If you would like Code Climate to alert all users in the room when a new Code Climate notification is posted, check the Notify option.
- To verify the HipChat data is valid, click Test Service (this will post a sample message to your HipChat room). If a green message appears at the top of the screen, all is well. If a red error message is displayed, see Troubleshooting below.
If you are seeing a red error message after clicking Test Service:
- Ensure there are no leading or trailing spaces around the API token or room ID that you provided to Code Climate.
- Ensure your API token is an API Auth Token and was generated from the API tab on your HipChat Group Admin page. It should not be a Room Notifications Token generated from the Rooms tab.
Updated over 6 years ago