Connect the integration
Connecting your GitHub account to Relevance AI is a straightforward process:- Go to the “Integrations” page in the sidebar of your Relevance AI dashboard.
- Click on “GitHub” from the available integrations.
- Click on the “Add Integration” button.
- In the pop-up window, sign into your GitHub account.
- Grant the necessary permissions for Relevance AI to access your GitHub repositories.
- Once authenticated, your GitHub account will appear as a connected integration.
Tool steps for GitHub
The GitHub integration provides a comprehensive set of actions that your agents can use to interact with your repositories and development workflows. These actions can be incorporated into your agent’s workflows as tool steps, enabling sophisticated development automation capabilities.Repository Management
Create Repository
Get Repository Info
Get Repository Content
Star Repo
Branch & Commit Operations
Create Branch
Get Commit
List Commits
Create or Update File Contents
Issue Management
Create Issue
Create Issue Comment
Update Issue
Get Issue Assignees
Search Issues and Pull Requests
Pull Request Operations
Create Pull Request
Get Reviewers
Update Project (V2) Item Status
Workflow Automation
Create Workflow Dispatch
Enable Workflow
Disable Workflow
Get Workflow Run
List Workflow Runs
Gist Management
Create Gist
Update Gist
List Gists for a User
Release Management
List Releases
Use the integration’s API tool step (Advanced)
In addition to the pre-built actions available in the tool directory, you can build custom tools that perform GitHub-specific activities using the GitHub API Call tool step.How to use the GitHub API Call tool step
Create a new tool
Add the GitHub API Call tool step
- Scroll down to Tool-steps
- Search for “GitHub API Call” in the tool step search bar
- Add the GitHub API Call tool step to your workflow
Select your GitHub account
Configure the API endpoint
- Method: Select the HTTP method (GET, POST, PUT, DELETE, PATCH)
- Endpoint: Enter the API endpoint path (e.g.,
/repos/{owner}/{repo}/collaborators/{username}) - Body: Add any required request body data
Add the required header
Test your API call
Example: Managing Repository Collaborators
Here’s a practical example of using the GitHub API Call tool step to add a collaborator to a repository: API Endpoint:PUT /repos/{owner}/{repo}/collaborators/{username}
Configuration:
- Uses the PUT method to add or update a collaborator
- Specifies the repository owner, name, and collaborator username
- Includes the required
acceptheader - Sets the permission level to “push” (can also be “pull”, “triage”, “maintain”, or “admin”)
Common GitHub API Endpoints
Here are some commonly used GitHub API endpoints you can use with the API Call tool step:Repository Collaborators
Repository Collaborators
- Check permissions:
GET /repos/{owner}/{repo}/collaborators/{username}/permission - Add collaborator:
PUT /repos/{owner}/{repo}/collaborators/{username} - Remove collaborator:
DELETE /repos/{owner}/{repo}/collaborators/{username}
Repository Contents
Repository Contents
- Get contents:
GET /repos/{owner}/{repo}/contents/{path} - Create/update file:
PUT /repos/{owner}/{repo}/contents/{path} - Delete file:
DELETE /repos/{owner}/{repo}/contents/{path}
Issues
Issues
- List issues:
GET /repos/{owner}/{repo}/issues - Get issue:
GET /repos/{owner}/{repo}/issues/{issue_number} - Create issue:
POST /repos/{owner}/{repo}/issues - Update issue:
PATCH /repos/{owner}/{repo}/issues/{issue_number}
Pull Requests
Pull Requests
- List PRs:
GET /repos/{owner}/{repo}/pulls - Get PR:
GET /repos/{owner}/{repo}/pulls/{pull_number} - Create PR:
POST /repos/{owner}/{repo}/pulls - Update PR:
PATCH /repos/{owner}/{repo}/pulls/{pull_number} - Merge PR:
PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge
Branches
Branches
- List branches:
GET /repos/{owner}/{repo}/branches - Get branch:
GET /repos/{owner}/{repo}/branches/{branch} - Create branch:
POST /repos/{owner}/{repo}/git/refs
Example use cases
Here are some ways you can leverage the GitHub integration with your agents:Automated Code Review Assistant
Automated Code Review Assistant
Issue Triage Bot
Issue Triage Bot
Release Notes Generator
Release Notes Generator
Repository Maintenance Agent
Repository Maintenance Agent
Onboarding Automation
Onboarding Automation
Documentation Sync Agent
Documentation Sync Agent
Security Compliance Monitor
Security Compliance Monitor
Workflow Orchestrator
Workflow Orchestrator
Frequently asked questions (FAQs)
What permissions does the GitHub integration require?
What permissions does the GitHub integration require?
Why am I getting 'Please enter a value for response_body field' error?
Why am I getting 'Please enter a value for response_body field' error?
accept: application/vnd.github+json header is missing from your GitHub API Call tool step. Make sure to add this header in the Headers section of your API call configuration.Solution: Add the following header to your API call:Can I restrict my Agent to only access certain repositories?
Can I restrict my Agent to only access certain repositories?
How do I authenticate with GitHub for API calls?
How do I authenticate with GitHub for API calls?
What's the difference between the pre-built GitHub tool steps and the API Call tool step?
What's the difference between the pre-built GitHub tool steps and the API Call tool step?
Can I use GitHub webhooks to trigger my agents?
Can I use GitHub webhooks to trigger my agents?
Are there rate limits for GitHub API calls?
Are there rate limits for GitHub API calls?
/rate_limit endpoint.Can I work with GitHub Enterprise?
Can I work with GitHub Enterprise?

