Our Lighthouse integration enables you to turn issues flagged in Code Climate into Lighthouse tickets in one quick click. For example, on your Feed page, mouse over a smell and click the "ticket" icon.
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.
Show Me How
The steps below explain how to set up and test Code Climate's Lighthouse integration. Note that these steps will require you to move back and forth between Code Climate and Lighthouse.
- In Lighthouse, copy your subdomain. This can be found in any URL while viewing your Lighthouse project. Copy the text between the https:// and the end of the domain. For example, codeclimate would be the host domain of the following URL: http://codeclimate.lighthouseapp.com/projects/123456-code-climate/overview
- 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 Lighthouse, click Set Up.
- Paste the subdomain into the Subdomain field.
- Generate your API token. Back in Lighthouse click your user name or avatar in the top-right of the page.
- Under the Create An API Token section select the account of the project you would like Code Climate to post to.
- Enter a name for your token.
- Select the project you would like Code Climate to post to.
Note: Ensure the token is set to full access.
Copy the API token you just generated.
Back in Code Climate, paste the API token into the API Token field.
Locate your Project ID. In Lighthouse, this can be found in any URL while viewing your Lighthouse project. Copy the digits just following the projects/. For example, 123456 would be the project ID of the following URL: http://codeclimate.lighthouseapp.com/projects/123456-code-climate/overview
Back in Code Climate, paste the project ID into the Project field.
Enter any labels in the Labels field. These labels will be associated with any tickets created by Code Climate.
Ensure Active is checked and click Save.
To verify the Lighthouse data is valid, click Test Service (this will post a test ticket to your project). 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 any of the input fields that you provided to Code Climate.
Ensure your subdomain does not contain any slashes, dots, or prefixes (e.g., "/",".","http://").
Ensure your project ID is taken from a project page URL, not from your user account page.
Updated almost 6 years ago