# GitHub

Connect a repository, link commits and pull requests to tasks, and choose what syncs.

> **Plan:** Available on the Indie and Studio plans.

Connect a GitHub repository to a project and Frostbyte links your commits and pull requests to the tasks they mention. Pull requests can move their tasks as they open and merge, completed releases can publish GitHub Releases, and tasks and releases can stay in step with GitHub issues and milestones.

**When to use it.** Connect GitHub when your code lives there and you want each task to show the work that delivered it. The links work on their own; issue and milestone sync are optional, for teams that also track work in GitHub.

## Connect a repository

1. Open **Settings → Connections** and choose **Install app** beside **GitHub App**. Give the app access to the repository in GitHub.
2. Open the project's **⋯** menu and choose **GitHub**. Project settings opens at its **GitHub** section.
3. Choose **Refresh** if the repository isn't listed, then choose it. It shows as **Connected**.

![The GitHub section of RollCall's Project settings: the connected repository with Disconnect, and the Automation switches with Sync existing items.](https://getfrostbyte.dev/images/docs/project-settings-github.webp "Each switch saves as you change it.")

Only the project owner and admins can connect GitHub and change its settings. The project owner's plan decides whether GitHub is available. To install the app on another account or organisation, choose **Add another** in **Settings → Connections**.

## Link work to a task

Write the task number with `FB-` in front in a commit message, or in a pull request's title or description. Task #13 on the board is `FB-13`:

```text
Serve feed thumbnails (FB-13)
```

A pull request from a branch named after the task links too, such as `fb-13-feed-thumbnails` or `agent/FB-13`. The commit or pull request appears in the task's **GitHub** section with its state, such as **merged**. A pull request also shows the lines it adds and removes, how many files it touches and, while it's open, its review: **Approved** or **Changes requested**. The card shows the latest pull request, and turns orange with **Changes requested** when a reviewer asks for changes.

![Task #13 open, with a Last agent update and a merged pull request, Serve feed thumbnails, in its GitHub section.](https://getfrostbyte.dev/images/docs/task-agent-summary.webp "A linked pull request shows on the task with its state.")

> **Note:** `#13` keeps its GitHub meaning: issue or pull request 13 in your repository. It reaches a Frostbyte task only when that task is synced to issue 13.

## Move tasks with pull requests

Turn on **Move tasks with pull requests**. A pull request that links a task moves it from To Do to **In Progress** when it opens. To finish the task when the pull request merges, name the branch after the task or write a closing word before the task number:

```text
Fixes FB-13
```

`Fix`, `Fixes`, `Fixed`, `Close`, `Closes`, `Closed`, `Resolve`, `Resolves` and `Resolved` all work, in any capitals. The task moves to **Done** when the pull request merges into your default branch. A pull request closed without merging leaves the task where it is.

A commit with a closing word does the same once it's pushed to your default branch.

## Choose what syncs

Turn on what you need under **Automation**. Each switch saves straight away:

| Setting | What it does |
|---|---|
| **Move tasks with pull requests** | Moves linked tasks to In Progress when a pull request opens, and to Done when one that closes them merges into your default branch |
| **Sync releases & milestones** | Keeps releases and GitHub milestones in step: name, description, target date and whether they're open. Pull requests for tasks in one release get its milestone if they have none |
| **Sync all tasks & issues** | New tasks create GitHub issues and new issues create tasks. After that, task edits update the issue, and status and assignees sync both ways |
| **Sync bugs only** | The same, for Bug tasks and issues labelled `bug` only |
| **Publish GitHub Releases** | Completing a release publishes it as a GitHub Release with its notes and merged pull requests. The tag is the release name, such as `v1.1.0`, or a slug like `sprint-48` |

Closing a synced issue marks its task Done, and reopening it moves the task back to To Do. Renaming the issue renames the task. Changing the task updates the issue the same way, including its area, which becomes a label named after the area.

Closing a synced milestone completes its release, which sends the same shipped emails as completing it in Frostbyte.

**Assignees sync for people who've connected GitHub** under **Settings → Account**, so Frostbyte knows which GitHub user is which member.

## Sync work you already have

Sync settings apply to new work. To create issues and milestones for tasks and releases that existed before, choose **Sync now** beside **Sync existing items** under **Automation**. It follows the switches you've turned on.

Existing GitHub issues aren't pulled into Frostbyte. **Sync existing items** sends Frostbyte tasks and releases to GitHub. New issues opened after issue sync is enabled can create tasks here.

## Things to note

- **Repository access lost?** If the GitHub section says so, review the app's access in **Settings → Connections**, then choose **Refresh**.
- **Reviews don't move tasks.** A change request shows on the card but leaves the task in its column.
- **Disconnecting keeps your links.** **Disconnect** stops all syncing, and the commits and pull requests already on tasks stay. To remove the app's access too, uninstall it in GitHub.
- **GitHub Releases need write access.** **Publish GitHub Releases** needs the app's Contents write permission. If GitHub asks you to accept new permissions, accept them, then choose **Refresh**. Each release publishes once, even if you reopen and complete it again.
- **Release notes are separate.** Milestone sync and GitHub Releases don't publish to your [changelog](https://getfrostbyte.dev/docs/release-notes-generator).
- **Deleting a milestone keeps the release.** The release stays in Frostbyte, unlinked from GitHub.
- **Agents follow the same settings.** Changes your [connected agent](https://getfrostbyte.dev/docs/agent-capabilities) makes sync to GitHub like any other, and it can link a pull request it opened with `task_link_github`.

## Related

- [Tasks](https://getfrostbyte.dev/docs/tasks): where linked work appears.
- [Releases](https://getfrostbyte.dev/docs/releases): what milestones sync with.
- [Working with your agent](https://getfrostbyte.dev/docs/agent-capabilities): have your agent name its branches and pull requests after the task.
