Skip to main content
A factory reads its issues, pull requests and GitHub checks from GitHub. Connect a repository before you add work. Connecting has two parts. Install the OuterLayer GitHub App on your GitHub organization. Then link a repository and its base branch to the factory.

Before you start

You need the Owner or Admin role in OuterLayer. A custom role needs these permissions: On GitHub, only an owner of the GitHub organization can install the App. Any other member can request the install, and an owner approves it. A repository under your own GitHub account needs no approval.

Connect the first repository

1

Start from the factory

Choose Connect GitHub repository. A new factory shows it on its Work page. Settings → Repositories shows it too.
2

Install the App on GitHub

Choose the GitHub organization. Then give the App all repositories or only the ones you select.Include the repository you want to link. You can change this choice later on GitHub.
3

Link a repository and its base branch

GitHub returns you to the factory. Choose Link repository.Choose the repository in Select a Repository and the branch in Select a Branch. Then choose Save.Choose the branch your pull requests merge into. OuterLayer reads the judges from .outerlayer/judges/ on each pull request’s base branch. A repository that a control plane governs reads them from the control plane.
The repository’s open issues now appear in Add work on the Work page.

Repositories and factories

A factory can hold several repositories. To add one, choose Link repository on Settings → Repositories.
The Repositories settings page: the GitHub organization acme with one linked repository, acme/web on main, the Use as control plane and Unlink buttons, the Post session summaries on pull requests switch on, the Let builds change GitHub workflows switch off, and the Add GitHub organization and Link repository buttons

Settings → Repositories, with one linked repository.

A repository belongs to one factory in an organization. OuterLayer refuses a link to a repository that another factory has, and the message names that factory. Unlink the repository there first. Create a second factory only when a group of repositories needs its own Work page, keys and settings. Each repository has its own agent instructions and checks. To share one set between repositories, see Share instructions across repositories.

One installation for every factory

Every factory in your OuterLayer organization uses the same installation of the App on a GitHub organization. Install the App one time. Each other factory adds that installation in OuterLayer, with no step on GitHub. To add an installation that another factory uses:
  1. In the factory, open Settings → Repositories.
  2. Find the GitHub organization in the list of organizations that are already installed. Its row reads already installed for this organization.
  3. Choose Add on that row.
  4. Choose a repository and its branch in the Link repository dialog, then choose Save.
The list shows only the installations of factories where you can change the git connection. There you need the Connect a repository permission. A suspended installation is not in the list. If the GitHub organization is not in the list, choose Connect GitHub repository or Add GitHub organization. When the App is already on that GitHub organization, GitHub opens the installation’s settings and installs nothing new. Finish on GitHub within 10 minutes. After that, start again from the factory. If Link repository does not list a repository, the installation does not include it. On GitHub, open Settings → Applications → Installed GitHub Apps → OuterLayer → Configure and add the repository. Then link it from the factory. Another OuterLayer organization can use the same installation. Connect from your factory as usual, and authorize when GitHub asks. Neither OuterLayer organization sees the other’s connection.

Repositories from more than one GitHub organization

A factory can link repositories from several GitHub organizations, for example acme and acme-labs. Install the App one time on each GitHub organization.

Add a GitHub organization

If another factory already uses the App on the GitHub organization, choose Add on its row instead. See One installation for every factory.
  1. On Settings → Repositories, choose Add GitHub organization.
  2. Install the App on the GitHub organization.
  3. Choose a repository and its branch in the Link repository dialog, then choose Save.
If you are not an owner of the GitHub organization, GitHub sends your request to an owner. Settings → Repositories shows Waiting on an owner. After an owner approves, choose Add GitHub organization again.

Remove a GitHub organization

Remove organization unlinks every repository this factory links from that GitHub organization. The dialog lists them. Type the GitHub organization’s name to confirm. The App stays installed on GitHub, and other factories that use it do not change. To uninstall the App, use the link to GitHub in the dialog. If the GitHub organization holds the factory’s control plane, name a control plane in another GitHub organization first. If you do not, the factory uses its first-linked repository. See The default control plane.

If the App is suspended or uninstalled on GitHub

  • Suspended. The GitHub organization shows Suspended on GitHub. Its repositories stay linked, but builds of their items fail with repository_not_reachable. Builds work again when an owner unsuspends the App.
  • Uninstalled. OuterLayer unlinks that GitHub organization’s repositories from every factory, and a notice names them. To install the App again, choose Reinstall on for that GitHub organization. Then link the repositories again.
On Settings → Repositories, choose Unlink on the repository’s row. The App stays installed, so you can link the repository again later. If you unlink the control plane repository, the factory uses its first-linked repository as the control plane. See The default control plane.

Work items in an unlinked repository

An unlink changes no work item and no pull request. The factory stops getting updates from that repository. A work item with an open pull request in that repository shows Repository disconnected. The factory cannot build or evaluate the item, and a build request stops with pull_request_repository_not_connected. Do one of these:
  • Link the repository again. Choose Reconnect repository on the item, then Link repository. The item returns as it was.
  • Remove the item from the Work page. Run outerlayer work remove --item <number> --reason "<why>".

Issues in Linear or Jira

The repository connection reads GitHub issues. To add Linear or Jira issues to the Work page, also connect an issue tracker. You still need the repository connection, because pull requests, GitHub checks and the judges come from GitHub.

What the connection is used for

Switches for each repository

The evidence comment shows the item’s verdict and links to the work item’s page. It reads OuterLayer verdict: pass, OuterLayer verdict: waiting or OuterLayer verdict: flagged. Post session summaries on pull requests on Settings → Repositories turns the comment and the OuterLayer evidence status check on or off. Each linked repository has its own switch, and each switch starts on. When you turn the switch off, OuterLayer posts no new comments and no new status checks. Comments already posted stay. Each repository also has a Let builds change GitHub workflows switch. It starts off. See Letting a build change workflows.

If GitHub returns an error

When OuterLayer cannot finish a connect, you stay signed in and see a page that says what failed. If a connect fails again, the App may be uninstalled on GitHub. Start the connect again, and GitHub offers the install.

Next steps