GitHub is a development platform, version control and collaboration platform for teams, hosting open source and private business code. The GitHub connector can be used to provide search and topic modeling on GitHub issues from repositories of your choice. It can also be configured to sync back any topics added back to the repository as labels. You will need to create one GitHub sync task per repository to be synchronized in your Curiosity application.
Configuring the GitHub Connector
In order to configure a GitHub data-source on your Curiosity application, you will need to first create an API token for a user that has access to the repository you would like to sync. For public repositories, you can use your own personal token but you might not be able to sync back topics from issues.
First, open your settings page on GitHub:
From there, click on Developer Settings on the left side menu:
And then in Personal access tokens:
Click on the Generate new token button:
Give your token a name, and enable the repo scope:
Finally, click on Generate token on the bottom of the page:
You'll see your API token as shown below. Copy it in a safe place, as you will not be able to access it again.
Adding a GitHub Data Source
One you've created a GitHub Token, you can proceed to configure a data sync task for a GitHub repository. First, open the Data Sources Hub on your Curiosity instance:
Then select the GitHub option on the list of available data connectors:
And click on the Add button to create a new sync task:
As an example, we'll configure a GitHub task for the Kubernetes repository. The settings for the task are:
- Repository: kubernetes (the name of the repository)
- Source: k8s (a user-friendly name for this source, useful for filtering when searching)
- Owner: kubernetes (the organization or user that owns of the kubernetes repository)
- Token: Github Token created earlier
Click on Save and wait until the task is configured. To run it once for testing, click on the Play button next to the task name on the list:
You should be able to follow the task initial sync progress from your application logs.