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

# GitHub

> Manage repositories, pull requests, and issues

Connect your agent to GitHub to work with your code repositories — browse files, create and review pull requests, manage issues, and react to events like new issues or PRs.

## How to enable

Go to **Settings → Capabilities** and enable **GitHub**. Then enter your personal access token, and optionally specify which repositories to watch (see below for details).

## Example use cases

* **Code Review Assistant** — "Review PR 254 and flag any potential issues or security concerns"
* **Release Notes Generator** — "Summarize all commits since the last release and generate release notes"
* **Issue Triage** — "When a new issue is created, analyze it and add appropriate labels"
* **Dependency Updates** — "Check for outdated dependencies and create a PR with updates"

## How to connect your GitHub account

<Steps>
  <Step title="Create a personal access token">
    Go to [GitHub Settings → Developer settings → Personal access tokens](https://github.com/settings/tokens) and create a new token. GitHub offers two types:

    **Fine-grained tokens** (recommended) — Create a [fine-grained token](https://github.com/settings/personal-access-tokens/new) with for example these permissions:

    * **Contents**: Read and write
    * **Metadata**: Read-only (required)
    * **Pull requests**: Read and write
    * **Issues**: Read and write

    **Classic tokens** — If you need simpler setup or access across multiple organizations, create a [classic token](https://github.com/settings/tokens/new) with the `repo` scope.

    See GitHub's [documentation on personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) for more details.
  </Step>

  <Step title="Configure in Abundly">
    Go to **Settings → Capabilities** and enable **GitHub**. Paste your personal access token.

    If you want the agent to react to GitHub events (via webhooks), enter the repositories to watch in the **Watched repositories** field — for example, `owner/repo` or `myorg/myrepo`. Multiple repos can be comma-separated.
  </Step>

  <Step title="Set up webhooks (optional)">
    To trigger your agent when events happen in GitHub (new issues, pull requests, etc.), configure a webhook in each repository you're watching:

    1. Go to your repository → **Settings → Webhooks → Add webhook**
    2. Set the Payload URL to:
       ```
       https://service.abundly.ai/api/github/webhook
       ```
           <Note>
             Enterprise customers on a dedicated deployment will have a different base URL. Replace `service.abundly.ai` with your organization's service URL, which you can find in your Abundly workspace settings or by contacting support.
           </Note>
    3. Set Content type to `application/json`
    4. Select which events should trigger the webhook (e.g., Issues, Pull requests, Pushes)
    5. Click **Add webhook**

    With webhooks configured, your agent will be notified whenever events happen in the repository. However, you also need to instruct the agent on what to do with these events — otherwise it will likely ignore them. For example, add to your agent's instructions: "When a new issue is created, analyze it and add appropriate labels."

    <Tip>
      Without webhooks, your agent can still work with GitHub — but only when you ask it to (via chat or scheduled tasks).
    </Tip>
  </Step>
</Steps>
