Docs/GitHub
#

GitHub

Install the Cofactor GitHub App to link repositories, test pull requests from a comment, build sandboxes from branches, and post results back to the PR.

GitHub is critical for a variety of Cofactor features: it's how Cofactor reads your code to build sandboxes, how pull requests get tested from a comment, and how results land back in the review conversation.

01Connect

  1. In Settings → GitHub, click Install GitHub App.
  2. Pick the account or organization, and grant access to the repositories that build your applications.
  3. Link repos to the application they belong to — in the app, or from the CLI:
bash
cofactor property repo link --property <id> --repo owner/name
Settings → GitHub — Install GitHub App connects the repos Cofactor can read

Multi-service apps: link every repo that ships together. A sandbox template can include all of them, so one environment holds the whole release.

The GitHub panel once connected — account, accessible repositories, and links to each application

02What the connection powers

Test a PR from a comment

Mention @cofactor on any pull request in a connected repository and Cofactor runs an ad-hoc test against a sandbox built from that PR's branch — unmerged code, disposable environment:

@cofactor make sure the new pricing banner shows for free-tier users

A bare @cofactor tests the behavior changed by the diff. Cofactor posts a status comment immediately and edits it in place: verdict, per-check results, verified issues with replay links, and a recording link that never expires. The full walkthrough is in Ad-hoc testing.

Cofactor's PR writeback — verdict, test plan, issues, and a permanent recording link

Build sandboxes from your repos

Sandbox templates are created from connected repositories — Cofactor clones the linked repo(s), builds the app, seeds it, and provisions disposable instances on demand. The repository link at the application level decides what's available at template-creation time. See Setting up a sandbox.

Webhooks and check runs

The App subscribes to pull-request webhooks, so PR-triggered work starts without polling, and posts check-run results on your commits where your branch protection can see them.

03Troubleshooting

SymptomCheck
@cofactor comment gets no reactionThe repo isn't connected, or isn't linked to an application — re-check Settings → GitHub and the repo link
No repositories offered during sandbox template creationGitHub is connected but no repo is linked to this application — cofactor property repo link
App installed on the wrong org/accountReinstall from Settings → GitHub, choosing the right account during the GitHub authorization step