Skip to main content
GitHub is the world’s leading platform for version control and collaborative software development. With Relevance AI’s GitHub integration, you can connect your GitHub repositories to your AI agents, enabling them to manage code, issues, pull requests, and workflows. Your agents can also respond automatically to GitHub events like new issues, pull requests, commits, and more through instant webhook triggers.
The GitHub integration in Relevance AI was built by Relevance AI, and is therefore supported by our team, not GitHub. If you have a question or issue with using GitHub in Relevance AI, please reach out to our support team. If you have a question or issue that is only about GitHub, you can reach out to GitHub support.

Connect the integration

Connecting your GitHub account to Relevance AI is a straightforward process:
  1. Go to the “Integrations” page in the sidebar of your Relevance AI dashboard.
  2. Click on “GitHub” from the available integrations.
  3. Click on the “Add Integration” button.
  4. In the pop-up window, sign into your GitHub account.
  5. Grant the necessary permissions for Relevance AI to access your GitHub repositories.
  6. Once authenticated, your GitHub account will appear as a connected integration.

Triggers for GitHub

The GitHub integration allows you to set up triggers that automatically activate your AI agents when specific events occur in your repositories. Most GitHub triggers are instant (webhook-based), meaning your agents respond in real-time as soon as events happen — whether it’s a new issue being opened, a pull request being merged, or a workflow run completing. This enables event-driven automation that keeps your development workflows moving without manual intervention. The following trigger options are available, organized by category:
Monitor changes at the repository level.
  • New repository (Instant) — Triggers when a new repository is created in your account or organization. Useful for applying default settings, adding collaborators, or creating initial issues.
  • New fork (Instant) — Triggers when someone forks your repository. Use this to track adoption, send welcome messages, or log fork activity.
  • New star (Instant) — Triggers when a user stars your repository. Ideal for tracking growth milestones or sending thank-you notifications.
  • New watcher (Instant) — Triggers when a user starts watching your repository for notifications.
  • New tag (Instant) — Triggers when a new tag is pushed to a repository. Useful for initiating release workflows or changelog generation.
Respond to activity on issues and pull requests.
  • New issue (Instant) — Triggers when a new issue is opened. Perfect for auto-labeling, assigning issues to the right team member, or sending acknowledgment replies.
  • Updated issue (Instant) — Triggers when an issue is modified (title, body, labels, assignees, or status). Use this to sync issue state with external project management tools.
  • New pull request (Instant) — Triggers when a pull request is opened or ready for review. Ideal for starting automated code review, running checks, or notifying reviewers.
  • Updated pull request (Instant) — Triggers when a pull request is modified or changes state (e.g., converted to draft, marked ready, or closed).
  • New comment (Instant) — Triggers when a comment is added to an issue or pull request. Useful for extracting action items, detecting questions, or routing feedback.
  • New label on issue (Instant) — Triggers when a label is applied to an issue. Use this to route issues into category-specific workflows.
  • New review request (Instant) — Triggers when a reviewer is requested on a pull request. Useful for notifying reviewers or starting pre-review automation.
  • New pull request review (Instant) — Triggers when a review is submitted on a pull request (approved, changes requested, or commented).
React to new code activity in your repositories.
  • New commit (Instant) — Triggers when a new commit is pushed to any branch. Use this to run linting, update changelogs, or notify downstream systems.
  • New push (Instant) — Triggers on any push to a repository, including multiple commits. Useful for triggering CI/CD steps or deployment checks.
  • New branch (Instant) — Triggers when a new branch is created. Ideal for setting up branch-specific configurations or notifying the team.
Monitor GitHub Actions activity.
  • Workflow run completed (Instant) — Triggers when a GitHub Actions workflow run finishes, whether it succeeded, failed, or was cancelled. Use this to send alerts on failure or trigger post-deployment steps.
  • Workflow job completed (Instant) — Triggers when an individual job within a workflow run completes. Useful for fine-grained monitoring of CI pipeline steps.
Track team and contributor activity.
  • New collaborator (Instant) — Triggers when a collaborator is added to a repository. Useful for onboarding automation or access auditing.
  • New mention (Instant) — Triggers when your account is mentioned in an issue, pull request, or comment. Use this to route mentions to the right team or create follow-up tasks.
Automate workflows around GitHub Projects.
  • Project item status changed (Instant) — Triggers when the status of an item in a GitHub Project (v2) changes. Use this to sync project state with external tools or notify stakeholders.
  • New card in column (Instant) — Triggers when a card is added to a specific column in a classic GitHub Project board.
Additional triggers for releases, gists, and discussions.
  • New release (Instant) — Triggers when a new release is published. Ideal for triggering release announcement workflows or documentation updates.
  • New gist (Instant) — Triggers when a new gist is created in your account. Use this to catalog or share snippets automatically.
  • New discussion (Instant) — Triggers when a new discussion is opened in a repository. Useful for monitoring community activity or routing questions to support.
  • New discussion comment (Instant) — Triggers when a comment is added to a discussion. Use this to detect follow-up questions or escalate unresolved topics.

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

Create a new GitHub repository

Get Repository Info

Retrieve information about a repository

Get Repository Content

Access files and folders in a repository

Star Repo

Star a repository

Branch & commit operations

Create Branch

Create a new branch in a repository

Get Commit

Retrieve details about a specific commit

List Commits

List commits in a repository

Create or Update File Contents

Create new files or update existing ones

Issue management

Create Issue

Create a new issue in a repository

Create Issue Comment

Add a comment to an existing issue

Update Issue

Update an existing issue

Get Issue Assignees

Retrieve assignees for an issue

Search Issues and Pull Requests

Search for issues and PRs across repositories

Pull request operations

Create Pull Request

Create a new pull request

Get Reviewers

Get reviewers for a pull request

Update Project (V2) Item Status

Update the status of a project item

Workflow automation

Create Workflow Dispatch

Trigger a workflow run

Enable Workflow

Enable a GitHub Actions workflow

Disable Workflow

Disable a GitHub Actions workflow

Get Workflow Run

Get details about a workflow run

List Workflow Runs

List workflow runs for a repository

Gist management

Create Gist

Create a new gist

Update Gist

Update an existing gist

List Gists for a User

List all gists for a user

Release management

List Releases

List releases for a repository
Type “GitHub” in the tool step search bar to see all available GitHub actions when building your tools.

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.
Required Header: When using the GitHub API Call tool step, you must include the header accept: application/vnd.github+json or you may encounter errors like 'Please enter a value for 'response_body' field'.

How to use the GitHub API Call tool step

1

Create a new tool

Create a new tool in Relevance AI or open an existing tool you want to add GitHub functionality to.
2

Add the GitHub API Call tool step

  1. Scroll down to Tool-steps
  2. Search for “GitHub API Call” in the tool step search bar
  3. Add the GitHub API Call tool step to your workflow
3

Select your GitHub account

Select your connected GitHub account from the dropdown menu.
4

Configure the API endpoint

Configure the API endpoint, method, and parameters according to your needs:
  • 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
5

Add the required header

This is the critical step! In the Headers section, add:
{
  "accept": "application/vnd.github+json"
}
This header tells GitHub’s API what format to return the response in. Without it, the API may not return a properly formatted response, causing errors in your tool.
6

Test your API call

Test your configuration to ensure it works correctly before deploying.

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:
{
  "method": "PUT",
  "endpoint": "/repos/myorg/myrepo/collaborators/johndoe",
  "headers": {
    "accept": "application/vnd.github+json"
  },
  "body": {
    "permission": "push"
  }
}
This configuration:
  • Uses the PUT method to add or update a collaborator
  • Specifies the repository owner, name, and collaborator username
  • Includes the required accept header
  • Sets the permission level to “push” (can also be “pull”, “triage”, “maintain”, or “admin”)
You can find GitHub’s complete API documentation at https://docs.github.com/en/rest.

Common GitHub API endpoints

Here are some commonly used GitHub API endpoints you can use with the API Call tool step:
  • 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}
View API documentation
  • 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}
View API documentation
  • 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}
View API documentation
  • 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
View API documentation
  • List branches: GET /repos/{owner}/{repo}/branches
  • Get branch: GET /repos/{owner}/{repo}/branches/{branch}
  • Create branch: POST /repos/{owner}/{repo}/git/refs
View API documentation
Remember: Always include the accept: application/vnd.github+json header in your API calls!

Example use cases

Here are some ways you can use the GitHub integration with your agents:
When the New Issue trigger fires, an agent analyzes the issue content and automatically applies labels (bug, feature request, documentation), assigns it to the appropriate team member based on the affected area, and posts an initial response with relevant links or questions — all before a human has seen it.
When the New Pull Request trigger fires, an agent reviews the diff for common issues — security vulnerabilities, missing tests, style violations — and posts inline comments with specific suggestions. The agent can request changes or approve based on configurable thresholds.
When the Workflow Run Completed trigger fires with a failed status, an agent posts a summary to your team’s chat channel, links to the failed job logs, and creates a GitHub issue with reproduction steps if the same workflow has failed multiple times in a row.
Create an agent that reviews pull requests, checks for common issues, adds comments with suggestions, and requests changes when necessary. The agent can analyze code quality, security vulnerabilities, and adherence to coding standards.
Deploy an agent that automatically generates comprehensive release notes by analyzing commits, pull requests, and issues between releases, formatting them according to your team’s standards.
Create an agent that performs routine maintenance tasks like closing stale issues, updating dependencies, archiving old branches, and ensuring repository settings comply with organizational policies.
Build an agent that automates developer onboarding by creating repositories from templates, setting up branch protection rules, adding team members with appropriate permissions, and creating initial issues for setup tasks.
Deploy an agent that keeps documentation in sync across multiple repositories, automatically updates README files when changes are detected, and ensures documentation standards are maintained.
Create an agent that monitors repositories for security compliance, checks for exposed secrets, ensures branch protection is enabled, and alerts teams when security policies are violated.
Build an agent that orchestrates complex GitHub Actions workflows, triggers deployments based on specific conditions, monitors workflow runs, and handles failures with automatic retries or notifications.

Frequently asked questions (FAQs)

The integration requires permissions to read and write to repositories, manage issues and pull requests, and access workflow information. You can review the specific permissions during the authentication process. You can also configure fine-grained access tokens in GitHub to limit access to specific repositories.
This error typically occurs when the required 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:
{
  "accept": "application/vnd.github+json"
}
Yes, you can configure your tools and triggers to only interact with specific repositories by setting the appropriate repository parameters. Additionally, you can use GitHub’s fine-grained personal access tokens to limit access at the GitHub level.
When you connect your GitHub account through the Integrations page, Relevance AI handles authentication automatically. When using the GitHub API Call tool step, simply select your connected GitHub account from the dropdown, and authentication will be handled for you.
Pre-built tool steps (like “Create Issue” or “Create Pull Request”) are designed for specific, common tasks and have simplified interfaces with guided inputs. The GitHub API Call tool step gives you full access to GitHub’s REST API, allowing you to implement any functionality available in the API, including advanced or custom operations not covered by pre-built steps.
Yes. The GitHub integration includes instant (webhook-based) triggers that activate your agents when specific events occur in your repositories — such as new pull requests, issues, or commits. Set up these triggers directly from the Triggers section in Relevance AI; no manual webhook configuration in GitHub is required.
Yes, GitHub enforces rate limits on API calls. For authenticated requests, the limit is typically 5,000 requests per hour. Your agents should be designed to handle rate limiting gracefully. You can check your current rate limit status using the /rate_limit endpoint.
The GitHub integration is designed to work with GitHub.com. For GitHub Enterprise Server installations, you may need to use the generic API Tool step with custom authentication. Contact our support team for assistance with GitHub Enterprise configurations.