Set up / Install the GitHub App
Install the GitHub App
hatchrun CI learns about pushes and pull requests through the hatchrun GitHub App. The App also lets hatchrun read your config and report check runs. Install it once per organization. Personal accounts are not supported.
Prerequisites
Section titled “Prerequisites”- Owner rights on the GitHub organization.
- A repository with
.hatchrun/config.yml. See the Quickstart.
Install the App
Section titled “Install the App”-
Sign in to the hatchrun app
Section titled “Sign in to the hatchrun app”Open app.hatchrun.io and sign in with GitHub. hatchrun asks GitHub who you are and which organizations you belong to.
-
Start the install
Section titled “Start the install”Choose to install the GitHub App. GitHub opens its install page and asks which account to install on. Pick the organization that owns the repository.
-
Choose repositories
Section titled “Choose repositories”GitHub offers two choices:
- All repositories. The App sees every current and future repository of the organization.
- Only select repositories. The App sees only the ones you pick.
hatchrun only acts on repositories it can see. Pick the ones that have, or will have, a
.hatchrun/config.yml. -
Review the permissions
Section titled “Review the permissions”GitHub lists the permissions the App asks for. See Permissions below for why each one is needed. Choose Install.
-
Return to hatchrun
Section titled “Return to hatchrun”GitHub sends you back to the hatchrun app. The organization and the repositories you picked appear there.
Expected result: the App appears under the organization’s Settings,
GitHub Apps, Installed GitHub Apps. The next push to a repository
with a .hatchrun/config.yml starts its workflows.
Permissions
Section titled “Permissions”The App asks for these permissions:
| Permission | Access | What hatchrun does with it |
|---|---|---|
| Contents | Read | Reads .hatchrun/config.yml at the event’s commit, and lets jobs check out the code |
| Checks | Read and write | Creates a check run per job and updates it as steps finish |
| Pull requests | Read | Reads the pull request of a pull_request event, such as its base branch and changed files |
| Metadata | Read | Required by GitHub for every App |
GitHub also lets a workflow ask for a job token with more access
through permissions:. The App will hold the permissions such tokens
may ask for.
The .hatchrun/config.yml format has no permissions: key yet, and
hatchrun convert drops it with a warning.
What happens on install
Section titled “What happens on install”GitHub sends hatchrun an installation event with the account and the
repositories you chose. hatchrun records them. It runs nothing on
install. Workflows start on the next matching event.
Change which repositories the App sees
Section titled “Change which repositories the App sees”- On GitHub, open the organization’s Settings, then GitHub Apps.
- Choose Configure next to hatchrun.
- Under Repository access, add or remove repositories, then save.
GitHub sends an installation_repositories event. A repository you
remove stops starting workflows at once.
Approve new permissions
Section titled “Approve new permissions”When the App asks for more permissions, GitHub emails the organization’s owners and shows a banner on the App’s settings page.
Until an owner approves, the App keeps its old permissions. CI events do not reach hatchrun until the CI permissions are approved.
Uninstall the App
Section titled “Uninstall the App”- Open the organization’s Settings, then GitHub Apps.
- Choose Configure next to hatchrun.
- Under Danger zone, choose Uninstall.
Uninstalling stops hatchrun CI for the whole organization. To stop CI for one repository only, remove the
repository from the App, or delete its .hatchrun/config.yml.