Prerequisites
- A GitHub account
- Access to the repositories you want to manage
Creating a Personal Access Token
- Visit GitHub.com and sign in to your account
- Click on your profile picture in the top right corner
- Select “Settings” from the dropdown menu
- In the left sidebar, click “Developer settings”
- Click “Personal access tokens”
- Select “Tokens (classic)” or “Fine-grained tokens”
Choosing the Right Token Type
Personal Access Token (Classic)
- Use for: Full repository access and legacy integrations
- Scopes needed:
repo
- Full control of private repositoriespublic_repo
- Access public repositories onlyworkflow
- Update GitHub Action workflowsadmin:org
- Full control of organizations (if needed)
Fine-grained Personal Access Token
- Use for: More secure, granular permissions
- Repository access: Select specific repositories or all repositories
- Permissions needed:
- Repository permissions:
Issues
: Read and writePull requests
: Read and writeContents
: Read and writeMetadata
: Read-only
- Repository permissions:
Generating Your Token
For Classic Tokens:
- Click “Generate new token (classic)”
- Give your token a descriptive name (e.g., “Jinba Flow Integration”)
- Set an expiration date (recommended: 90 days or less)
- Select the required scopes:
- ✅
repo
(Full control of private repositories) - ✅
workflow
(Update GitHub Action workflows)
- ✅
- Click “Generate token”
- Important: Copy the token immediately - you won’t be able to see it again!
For Fine-grained Tokens:
- Click “Generate new token”
- Give your token a descriptive name
- Set an expiration date
- Select “All repositories” or specific repositories
- Under “Repository permissions”, set:
- Issues: Read and write
- Pull requests: Read and write
- Contents: Read and write
- Metadata: Read-only
- Click “Generate token”
- Important: Copy the token immediately - you won’t be able to see it again!
Setting Up in Jinba Flow
- Go to your workspace settings in Jinba Flow
- Navigate to the “Secret” section
- Find “GitHub” in the list of available credentials
- Click “Configure” or “Add New”
- Enter your GitHub credentials:
- Token: Your personal access token (starts with
ghp_
for classic tokens orgithub_pat_
for fine-grained tokens) - Username: Your GitHub username
- Token: Your personal access token (starts with
- Click “Save” to store your credentials
Usage
Once configured, you can use GitHub in your flows to:- List and create issues
- Manage pull requests
- Read repository contents
- Update files and create commits
- Manage workflows and actions
- Interact with GitHub’s API