Let us clearly understand the goal in this section. Octocat Service app should be able to do the following.
- Know the current ticket that the user is viewing
- A button interface creates an issue on the specified GitHub repository specified by the user during the app configuration page. Of course, App should avoid duplicates.
- An option to open a modal for the ticket user is currently viewing. If it is associated with GitHub Issue already, the modal should display few details from the Issue in the modal.
Approach
- We will use the Data Method feature to get the context information from the current ticket details page that the user is viewing.
- Since App creates an issue in a GitHub repository, GitHub needs to trust the app and authenticate it. Therefore, We will use the OAuth2.0 feature to do this.
- Finally, we will use the Request Method to make API calls and populate the User Interface in the app.