> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mantle.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

> Access GitHub repositories, issues, pull requests, and workflows — manage your codebase and development process from Mantle

Connect GitHub to let selected agents browse code, search repositories, and work with issues and pull requests. The
token and agent tool choices control what they can access.

***

## What you unlock

<CardGroup cols={2}>
  <Card title="Repository access" icon="code-branch">
    Browse repositories, view files, and search code within the access granted to the connected token.
  </Card>

  <Card title="Issue management" icon="circle-dot">
    Create, update, and search issues. Assign labels, milestones, and team members directly from chat.
  </Card>

  <Card title="Pull request workflows" icon="code-pull-request">
    Review pull requests, check CI status, and manage branches through your agent.
  </Card>

  <Card title="Actions & workflows" icon="gears">
    Monitor GitHub Actions, view workflow runs, and track deployment status.
  </Card>
</CardGroup>

***

## Connect GitHub

<Steps>
  <Step title="Open Settings → Integrations">
    In any workspace go to **Settings → Integrations** and select **GitHub**.
  </Step>

  <Step title="Create a Personal Access Token">
    Go to [github.com/settings/tokens](https://github.com/settings/tokens), create a Personal Access Token (classic)
    with `repo`, `read:org`, and `read:user` scopes, and copy it.
  </Step>

  <Step title="Paste and connect">Paste the token into the **API Key** field and click **Connect**.</Step>
</Steps>

<Note>
  Use a **fine-grained token** or a classic token scoped to only the repositories and permissions your agent needs.
  Avoid using tokens with full admin access unless necessary.
</Note>

***

## Agent tools

Add GitHub tools to agents that need them. Their access is limited by the connected token and selected tools.

### Repositories & Code

| Tool              | Description                                         |
| ----------------- | --------------------------------------------------- |
| List repositories | List repositories for a user or organization        |
| Get repository    | Retrieve repository details and metadata            |
| Search code       | Search for code across repositories                 |
| Get file contents | Read file contents from a specific branch or commit |
| List branches     | List branches in a repository                       |
| List commits      | View commit history with optional filters           |

### Issues & Pull Requests

| Tool               | Description                                           |
| ------------------ | ----------------------------------------------------- |
| Create issue       | Create a new issue with title, body, and labels       |
| List issues        | List issues with filters for state, labels, assignees |
| Search issues      | Search issues and PRs across repositories             |
| Get pull request   | Retrieve pull request details, diff, and CI status    |
| List pull requests | List pull requests with state and branch filters      |
| Create PR review   | Submit a review on a pull request                     |

### Actions & Workflows

| Tool               | Description                                   |
| ------------------ | --------------------------------------------- |
| List workflow runs | View recent workflow runs and their status    |
| Get workflow run   | Retrieve details of a specific workflow run   |
| List workflows     | List all workflows configured in a repository |

***

## Triggers

<Note>
  Automated triggers for GitHub are not yet available. Triggers will be added in a future update — check back soon.
</Note>

***

## Example use cases

<AccordionGroup>
  <Accordion title="Quick code search from chat">
    Ask your agent "Find where we handle authentication in the backend" and it searches across your repositories,
    returning relevant file paths and code snippets.
  </Accordion>

  <Accordion title="Daily PR review summary">
    An agent lists open pull requests across your team's repositories each morning and posts a summary to your
    \#engineering channel — highlighting PRs waiting for review, CI failures, and stale PRs.
  </Accordion>

  <Accordion title="Create an issue from a bug report">
    When someone reports a bug in chat, ask your agent to create a GitHub issue with the right labels, assignee, and
    milestone — all populated from the conversation.
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="My token isn't working">
    Make sure the token was created at [github.com/settings/tokens](https://github.com/settings/tokens) and has the
    required scopes: `repo`, `read:org`, and `read:user`. If using a fine-grained token, verify it has access to the
    specific repositories you need.
  </Accordion>

  <Accordion title="Agent can't access private repositories">
    Classic tokens need the `repo` scope for private repository access. Fine-grained tokens need explicit repository
    access grants. Check your token configuration in GitHub.
  </Accordion>

  <Accordion title="Rate limiting errors">
    GitHub has API rate limits (5,000 requests/hour for authenticated users). If you hit limits, wait for the reset
    window or reduce the frequency of agent queries.
  </Accordion>

  <Accordion title="Organization repositories not showing">
    If your token has `read:org` scope but you still can't see org repos, check that the token is authorized for your
    organization under GitHub's **Settings → Applications → Authorized OAuth Apps** or SSO settings.
  </Accordion>
</AccordionGroup>

***

<Card title="Back to Integrations" icon="plug" href="/integrations/overview">
  View all available integrations
</Card>
