<!-- Enable repositories | Merget Docs · https://merget.ai/docs/repositories -->

# Enable repositories

Choose which repositories Merget watches, set their target branch and pick how much Merget may do.

Once the Merget GitHub App is installed, its repositories appear in Merget, turned off. Merget does nothing in a repository until someone turns it on. This page shows how to turn repositories on and off and what to set first. Every other option is covered in [Repository settings](https://merget.ai/docs/repository-settings).

## The Repositories page

Open Repositories from the left rail. The page lists every repository you can see from every GitHub account connected to your organization, turned on or not, sorted by name. See [Which repositories you see](https://merget.ai/docs/team#which-repositories-you-see). The head of the page says how many repositories are turned on, for example 3 of 12 repositories enabled, and holds two buttons: View merge queues and GitHub settings (Settings › GitHub).

The table sits in one card with its filters above it:

The enabled filter shows All, Enabled or Disabled, each with its count. Choose one to change which rows you see. To turn monitoring on or off, use the repository's own Enabled switch.

Search filters by part of the name as you type.

The Mode column heading is a filter: choose a mode to see only its repositories. The help icon beside it explains the three modes. On a narrow window, where the table stacks into cards and loses its headings, the same filter sits in the toolbar.

Clear filters resets all three.

### Table columns

| Column | What it shows |
| --- | --- |
| Repository | The repository name, which opens its [queue](https://merget.ai/docs/repository-queue). A closed lock means a private repository and an open lock a public one. |
| Target branch | The branch whose pull requests form the queue. When you haven't set one, it shows the repository's default branch with the note Default branch. |
| Enabled | A switch (Saving… while it saves). Turning on a repository that has never been on in your organization first asks for its automation mode; see [Turn a repository on](#turn-a-repository-on). |
| Mode | The [automation mode](https://merget.ai/docs/automation-modes): Advisory, Queue or Autonomous. Hover the heading's help icon for what each mode does. |
| Agent access | What coding agents may read here: Off, Findings only or Findings and graph. Hover for a description. See [Connect coding agents](https://merget.ai/docs/agents). |
| Last run | The status and time of the repository's latest run, which opens the run. A dash means no run among your organization's recent runs, or that runs couldn't be loaded, which the notice above the table says; hover the dash to see which. |
| Configure | Opens the repository's settings drawer. |

If your filters hide everything, the page says No repositories match the filters. Choose Clear filters to see all accessible repositories again. When there are no connected repositories, owners are directed to GitHub settings, and members are told that an owner needs to connect GitHub. When GitHub is connected and the list is still empty, the table says which of four things is true. The first and the last appear only once Merget's check is complete; the two that say "right now" mean Merget could not confirm your access and claim nothing; Merget asks again on its own while the page is open:

No public repositories to show. Link your GitHub account to see the private repositories you can read on GitHub.: no GitHub account is linked to your Merget account, and the connected repositories are all private. Click Link GitHub account.

No repositories to show right now. Link your GitHub account to see the private repositories you can read on GitHub.: the same, and Merget could not confirm which repositories are public either. The access notice above the table says why.

No repositories to show right now.: your GitHub account is linked, but Merget could not confirm your access, so the empty list proves nothing. Follow the access notice; Merget asks again on its own while the page is open.

Your GitHub account @octo cannot read any repository Merget is connected to in Acme., with your own login and organization: Merget confirmed with GitHub that the account can read none of them. With two or more accounts it reads None of your GitHub accounts (@octo, @octo-work) can read any repository Merget is connected to in Acme. Check the accounts in the GitHub card of Settings › Account, add the one you use in that GitHub organization, or ask a repository admin on GitHub for access.

While Merget checks which private repositories your GitHub account can read, the table shows a placeholder row instead of any of these, and the head of the page waits before counting, so you never read 0 of 0 repositories enabled for a list Merget has not finished. See [Install the GitHub App](https://merget.ai/docs/github-app) and [Which repositories you see](https://merget.ai/docs/team#which-repositories-you-see).

Repositories is where you choose what Merget watches.

What to look for

- Turning a repository on the first time asks for its automation mode.
- Configure opens the settings drawer for that row; mode, target and policy changes are saved there.

## New repositories

A repository that has just arrived from GitHub starts with:

| Setting | Starting value |
| --- | --- |
| Enabled | Off |
| Automation mode | Queue, until you choose one when you first turn it on |
| Target branch | Empty, which means the repository's default branch |
| Agent access | Findings and graph |

Merget posts nothing, prepares nothing and merges nothing in a repository that is turned off.

## Turn a repository on

Open Repositories.

Find the repository, using Search if needed.

Click its Enabled switch.

The first time a repository is turned on in your organization, a dialog titled Turn on followed by the repository name asks how much Merget does there. It opens on the Queue card, tagged Recommended and selected to start with. To choose Advisory or Autonomous, click Show 2 other modes and select its card; the two cards stay shown from then on. Click Turn on. The repository is turned on in the selected mode in one save; you can change the mode later in Configure.

Each card says what its mode is for:

Queue: "For running Merget's merge queue: Merget orders and prepares pull requests, with controls for developers and users over what merges."

Advisory: "For trying out Merget's pull request review analysis. Merget changes no code and merges nothing."

Autonomous: "For a fully autonomous queue: Merget orders, prepares and merges pull requests itself."

Under the selected card, Queue and Autonomous also say that the mode needs the App's Contents: write permission and what choosing it lets Merget do, with a link to the Terms of Service's Automated changes section. Cancel (or Esc) closes the dialog and leaves the repository off; nothing is saved.

To answer once for several repositories, tick Use this mode for the other repositories I turn on before you click Turn on. For the rest of this browser tab, every repository you turn on for the first time in this organization takes that mode without the dialog, and a notice above the table says so, for example Repositories you turn on in this tab use Queue mode. Click Ask each time in the notice to get the dialog back. Signing out forgets the choice too.

A repository that has been on before, and was turned off since, turns on at once with the mode and settings it kept; so does one GitHub gave back, through Re-enable.

From now on, Merget checks the repository's open, non-draft pull requests that target its target branch. In Advisory mode Merget reports findings and suggests an order without changing code or branches; in Queue and Autonomous mode it also prepares pull requests. See [The Merget check](https://merget.ai/docs/pr-check) for what appears on your pull requests.

The repository's queue appears on [Merge Queues](https://merget.ai/docs/merge-queues). Once Merget has planned it, a queue with no open, non-draft pull requests is hidden there unless you turn on Include empty queues.

If the save fails, the switch goes back to where it was and an error message appears under it. Try again. When GitHub refuses the write the chosen mode needs, the [GitHub permission change required](#github-permission-change-required) dialog opens instead.

You can also turn a repository on or off in its settings drawer, with Enable Merget at the top of the Simple section. The drawer asks nothing: its Automation mode cards sit just below, and both are saved with Save.

## First things to configure

Click Configure on the repository's row. A drawer titled Settings: followed by the repository name opens. Its Simple section, at the top, holds what this page covers; the other settings are grouped under Advanced. The settings described here take effect when you click Save; Cancel discards unsaved changes. Save becomes available when you change a value, so there is nothing to save if the existing settings already suit the repository.

### Target branch

Target branch is the branch Merget builds the queue for: "Merget queues the open, non-draft pull requests that target this branch."

Leave it empty to use the repository's default branch. The hint shows which one that is.

Type a branch name to use a different branch, for example `release`.

A name must be one git accepts: no spaces, `..`, `@{`, `~`, `^`, `:`, `?`, `*`, `[` or `\`, no segment starting with `.`, no trailing `/`, `.` or `.lock`, at most 255 bytes. Names with `#` or `%` in them, such as `release#2`, are fine. If a name breaks a rule, saving shows "That is not a valid branch name:" followed by the rules. Merget also checks that the branch exists on GitHub when you save a new name: a name the repository does not have shows "That branch does not exist on GitHub." and is not saved. (If GitHub cannot be reached at that moment, the name is saved unchecked.)

Pull requests stacked on a pull request in the queue join it too; see [Stacked pull requests](https://merget.ai/docs/stacked-pull-requests).

### Automation mode

Under Automation mode, choose how much Merget may do. The drawer shows all three cards, Queue first with its Recommended tag:

| Mode | What Merget does |
| --- | --- |
| Advisory | Analyzes every open pull request and suggests a merge order. It changes no code and no branches and merges nothing; its only change to your branch rules is renaming a required `sema` check ([Security and data](https://merget.ai/docs/security#what-merget-can-change)). |
| Queue | Also prepares each pull request against the code it will meet and publishes fixes to the pull request's own branch when needed. Your CI, or Merget's own build when you turn it on, verifies them. You approve merges in the dashboard or merge on GitHub. |
| Autonomous | Prepares pull requests as in Queue mode and also merges ready work automatically once GitHub's requirements for it are met, under the landing and failed-CI settings. A person with Write access can also request a landing over failing checks. See [When Merget lands by push](https://merget.ai/docs/security#push-landing). |

Merget follows the queue's merge requirements and your batching and passing-lane settings. In a line each, as the first-enable dialog puts it: Advisory is for trying out Merget's pull request review analysis; Queue is for running Merget's merge queue, with controls for developers and users over what merges; Autonomous is for a fully autonomous queue, where Merget merges pull requests itself. See [Automation modes](https://merget.ai/docs/automation-modes) for the details.

Queue and Autonomous need the App's Contents: write permission on GitHub. The drawer's Readiness summary, under the merge method, says whether the App has it and what the mode you picked needs.

Click Save. Saved appears under the drawer title.

For the merge method, agent access, analysis options and batching, see [Repository settings](https://merget.ai/docs/repository-settings).

Configure opens a drawer for one repository.

What to look for

- Simple starts with Enable Merget and the automation mode, then the target branch. Scroll down for the merge method.
- Queue comes first, tagged Recommended. Choose it, Advisory or Autonomous, then use Save at the bottom.

## GitHub permission change required

When you switch a repository from Advisory to Queue or Autonomous, or turn a repository on in one of them, Merget checks with GitHub that the App may write to the repository. If it can't, the save stops and a dialog titled GitHub permission change required opens. It explains that the mode pushes a prepared commit to the repository, which the Merget GitHub App may only do with the Contents: write permission, and that GitHub is currently refusing that write.

Click Update permissions on GitHub to open the Merget App's installation settings on GitHub, where the pending permission request is shown. (If the link isn't shown, open GitHub's Settings › Applications, find the Merget App and click Configure.)

Have an admin of the GitHub account review the request and approve Contents: write. Merget can't grant it for you.

Come back and click Try again.

Your unsaved choice is kept while the dialog is open, and the repository stays in its current mode until the write is allowed. Cancel closes the dialog without saving and takes you back to the drawer, with your choice still selected.

When the dialog opens as you first turn a repository on, the repository stays off until the write is allowed, and nothing is saved. Cancel takes you back to the mode choice, with your mode still selected, the other modes shown and the keyboard focus on the Advisory card: choose Advisory, which needs no write, to turn the repository on now, or Cancel there to leave it off. This happens with a remembered mode too.

When the dialog opens as you turn on again a repository that is set to Queue or Autonomous, with its switch or Re-enable, the repository stays off until the write is allowed, and nothing is saved. Cancel closes the dialog. To turn the repository on without the write, open Configure, choose Advisory and turn it on there.

The dialog can appear when a repository leaves Advisory or is turned on in Queue or Autonomous, whether you choose the mode then or it was set before. A new repository starts in Queue, so turning it on is checked unless you choose Advisory. It does not appear when you switch between Queue and Autonomous on a repository that is on.

## Who can change repositories

Anyone in the organization with Maintain or Admin access to a repository on GitHub, owner or not, can turn it on and off and change its settings, including the automation mode and agent access. For anyone else, its Enabled switch is disabled with Needs maintain or admin access on GitHub.

An authorized coding agent can enable a repository and change its settings when it has the repository-settings permission and you have the required GitHub access. The repository's agent access level stays a dashboard-only control. See [Connect coding agents](https://merget.ai/docs/agents#scopes).

A few related actions are for owners only: installing and removing GitHub connections, pausing and resuming merges (which also need Maintain or Admin), and using Turn off strict (which also needs Admin). See [Team and access](https://merget.ai/docs/team#owner-and-member-permissions).

## Turn a repository off

Click the repository's Enabled switch to turn it off, or turn off Enable Merget in the drawer and click Save. The drawer describes it as: "Off, Merget stops planning, analyzing and preparing here. Existing settings are kept."

What happens to queued work:

Merget ignores new activity on the repository's pull requests.

Queued work that hasn't started yet is skipped, and an open [batch](https://merget.ai/docs/batching) is abandoned.

In Autonomous mode, Merget stops merging there.

Work already running may finish, but nothing follows it.

The repository's queue disappears from Merge Queues.

Merget builds no new code graph for it: the [Graph](https://merget.ai/docs/graph#cant-build) page and agents' graph questions say Merget is off for the repository instead. Maps and graphs already built still open.

Your settings (mode, target branch, agent access and the rest) are kept. When you turn the repository back on, Merget picks up its open pull requests again with those settings, without asking for the mode again.

If you use [branch protection](https://merget.ai/docs/branch-protection) that requires the Merget check, remember that GitHub keeps requiring it after you turn a repository off. Update the protection rule if you stop using Merget on that branch.

To stop Merget for every repository of a GitHub account at once, remove the account in Settings › GitHub; see [Install the GitHub App](https://merget.ai/docs/github-app#remove-a-github-account).
