Asana
Our Asana integration enables you to turn issues flagged in Code Climate into Asana tasks 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 setup and test Code Climate's Asana integration. Note that these steps will require you to move back and forth between Code Climate and Asana.
- In Asana, click on your avatar in the top-right hand corner of the screen, then click My Profile Settings.
- Under the Apps tab, click Manage Developer Apps.
- Under the PERSONAL ACCESS TOKENS section, click Create New Personal Access Token and copy the resulting token.
- 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 Asana, click Set Up.
- Paste the token into the Personal Access Token field.
- To get your Workspace ID, go to https://app.asana.com/api/1.0/workspaces (ensure you are logged into Asana when viewing this page). This will display a JSON object of your workspace ID and name. Copy the workspace ID corresponding to the relevant workspace name.
- Back in Code Climate, paste the workspace ID into the Workspace ID field.
- Optional: Enter a Project ID. Note that Asana project IDs can be found in the URL while viewing your project's Overview page. Copy the numbers in between the slashes, directly after /0/. For example, in the following Asana URL, 1234567890123 would be this project's ID: https://app.asana.com/0/1234567890123/1234567890123.
- Back in Code Climate, paste the project ID into the Project ID field.
Note: By entering a project ID, any tasks created will be assigned to the designated Asana project. If the project ID is omitted all tasks will be visible and assignable to anyone in the Asana company/team.
- Optional: Enter an email address to assign tasks to a specific Asana user. This email address must be used by the relevant user in Asana.
- Ensure Active is checked and click Save.
- To verify the token and IDs are valid, click Test Service (this will post a sample task to Asana). If a green message appears at the top of the screen, all is well. If a red error message is displayed, see Troubleshooting below.
Troublshooting
If you are seeing a red error message after clicking Test Service:
- Invalid Workspace ID: Ensure the Asana workspace ID that you provided to Code Climate is correct. To get your workspace ID, go to https://app.asana.com/api/1.0/workspaces (ensure you are logged into Asana when viewing this page). This will display a JSON object of your workspace ID and name. The following screenshot shows two matching workspace IDs (Code Climate is on top).
-
Invalid Project ID: If you've provided Code Climate with an project ID, ensure the matching project still exists in Asana. Note that Asana project IDs can be found in the URL while viewing your project's Overview page. Copy the numbers in between the slashes, directly after /0/. For example, in the following Asana URL, 1234567890123 would be this project's ID: https://app.asana.com/0/1234567890123/1234567890123.
-
Invalid Email Address: If you've provided Code Climate with an assignee email address, that email must be tied to the appropriate user in Asana. If this email address has been changed or removed in Asana, the integration will no longer work. The following screenshot shows a valid assignee email address (Code Climate is on the left).
- Ensure there are no leading or trailing spaces around the token or IDs that you provided to Code Climate.
- Ensure you have not entered a workspace ID in the Project ID field, or vice-versa.
Updated over 7 years ago