GitHub
Github integration with Graffo
Configuration
GitHub source connector integrates with the GitHub REST API to extract and synchronize data.
Connects to your GitHub repositories.
It supports syncing repository metadata, directory structures, and code files with configurable filtering options for branches and file types.
View Source Code
Explore the Github connector implementation at: https://github.com/graffo-ai/graffo/tree/main/backend/graffo/platform/sources/github.py
Authentication
This connector uses a custom authentication configuration.
Authentication Configuration
GitHub authentication credentials schema.
personal_access_token
str
Yes
GitHub PAT with read rights (code, contents, metadata) to the repository
Configuration Options
The following configuration options are available for this connector:
Configuration Parameters
Github configuration schema.
repo_name
str
Yes
-
Repository to sync in owner/repo format (e.g., 'graffo-io/graffo')
branch
str
No
""
Specific branch to sync (e.g., 'main', 'development'). If empty, uses the default branch.
Data Models
The following data models are available for this connector:
Setting up a GitHub Personal Access Token for Graffo
To connect your GitHub repositories to Graffo, you'll need to create a Personal Access Token (PAT) with the appropriate permissions. This guide walks you through the process of creating and configuring a fine-grained token for use with Graffo.
Step 1: Access Developer Settings in GitHub
Navigate to your GitHub account settings by clicking on your profile picture in the top right corner, then select "Settings". From there, scroll down to find and click on "Developer settings" in the left sidebar.

Step 2: Create a New Fine-Grained Token
In the Developer settings page, select "Fine-grained tokens" from the left menu, then click on "Generate new token".

Step 3: Configure Your Token
Fill out the token form with the following details:
Token name: Choose a descriptive name like "Graffo Integration"
Expiration: Select an appropriate expiration date (recommended: 1 year for production use)
Repository access: Choose either "All repositories" or select specific repositories you want to connect to Graffo

Step 4: Set Required Permissions
For the GitHub connector to work properly, you need to grant the following permissions:
Under "Repository permissions":
Set "Contents" to "Read-only" - This allows Graffo to read repository files

Step 5: Generate and Save Your Token
After configuring the permissions, scroll to the bottom of the page and click "Generate token".
Important: GitHub will display your token only once. Make sure to copy and store it in a secure location, as you won't be able to view it again.
Step 6: Add Your Token to Graffo
When setting up the GitHub connector in Graffo:
Authentication: Paste your personal access token in the "Personal Access Token" field
Configuration: Enter the repository name in the format
owner/repo(e.g.,graffo-ai/graffo) in the "Repository Name" configuration field
Your GitHub repository is now connected to Graffo and ready for synchronization.
Last updated
