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
- In Settings → GitHub, click Install GitHub App.
- Pick the account or organization, and grant access to the repositories that build your applications.
- Link repos to the application they belong to — in the app, or from the CLI:
cofactor property repo link --property <id> --repo owner/name
Multi-service apps: link every repo that ships together. A sandbox template can include all of them, so one environment holds the whole release.
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.
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
| Symptom | Check |
|---|---|
@cofactor comment gets no reaction | The 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 creation | GitHub is connected but no repo is linked to this application — cofactor property repo link |
| App installed on the wrong org/account | Reinstall from Settings → GitHub, choosing the right account during the GitHub authorization step |
04Related
- Ad-hoc testing — PR-comment testing in depth
- Setting up a sandbox — repo-built disposable environments
- Properties — how repo links attach to applications