Goals

Let us clearly understand the goal in this section. The Asana and GitHub OAuth app should be able to do the following.

  1. Know the current ticket that the user is viewing.
  2. A button interface that creates a task on the configured Asana board and an issue on the configured GitHub repository.
  3. Use OAuth as the authorization mechanism to make API requests to Asana and GitHub.

Approach

  1. We will use the Data Methods to get the context information from the current ticket details page that the user is viewing.
  2. Since the app creates a task in an Asana project board, Asana needs to trust the app and authenticate it. Therefore, We will use the OAuth 2.0 feature to authorize the user for the app.
  3. We repeat the same OAuth 2.0 authorization for GitHub.
  4. Finally, we will use the Request Method to make API calls with both Asana and GitHub to create issues and tasks respectively.