How to create Github fine-grained token for Hivel Integration?
To integrate GitHub with Hivel using a fine-grained token, follow the steps below. This guide ensures a seamless setup, similar to the OAuth-based process but with specific token-based permissions.
Data Access by Hivel
Hivel accesses the past 60-90 days of metadata and pull requests from active repositories during the initial sync.
Requirements
Ensure to log in with an account possessing write permissions to relevant GitHub repositories.
Write permissions are mandatory for webhook publication, facilitating real-time data sync.
Best Practice
Opt for a service account rather than an individual-linked account.
Service accounts are typically overseen by the company's admin.
Steps to generate a Fine-Grained Token on GitHub
Log in to GitHub with an account that has write permissions for the repositories you want to integrate.
Navigate to Profile icon > Settings > Developer Settings.
Select Personal access tokens > Fine-grained tokens.
Click Generate new token.
Give the token name, preferably 'Hivel' and set an Expiration date as needed.
Grant the following permissions:
Repository permissions
Contents (read-only)
Metadata (read-only)
Pull Requests (read-only)
Webhooks (read and write)
Organization permissions
Members (read-only)
Click Generate token and copy the token immediately. Store it securely and share it with us.
Now go back to the homepage and follow the subsequent steps to allow access to fine-grained token: Navigate to Profile icon > Settings > Organizations.
Select the organizations which need to be integrated.
Go to Repository settings and scroll to the end of the navigation menu.
At the bottom of the navigation menu, select Personal Access Token > Settings.
Select Personal access tokens > Fine-grained tokens.
On this page, select the option to Allow access via fine-grained personal access tokens.
That's it, all done!
Screenshots for reference:
Last updated
Was this helpful?