GitHub API Token
This guide explains how to add a GitHub API token to Enji to allow the platform to collect data from GitHub repositories.
An API token is one of the methods Enji uses to retrieve information on engineering team activities from their repositories. This data is used to construct various project reports.
Generating a GitHub API token involves two crucial steps:
1. Setting permissions to use PAT (Personal Access Token).
2. Generating a personal PAT.
Setting permissions to use PAT
Copy link
Before generating the token, allow the use of PAT (Personal Access Token) in the organization.
- Open the organization's Settings → Personal access tokens → Settings.
- Set the value to Allow access for both PAT (Beta) and PAT (Classic), as shown in the picture below:
Generating a personal PAT
Copy link
- In GitHub, navigate to Settings → Developer settings.
- Go to Personal Access Tokens → Tokens (classic).
- Click on Generate new token.
- In the Token name, enter a name (can be any name).
- In Expiration Date, specify the token's validity period. It is best to set a range for a year or more. After expiration, the token becomes invalid, and Enji stops updating repository data.
- Check the boxes
Important: The user generating the token must have all the privileges described below.
7. Click on Generate token.
8. Copy the token and use it when creating a repository/group.