Hangar Floor
DemoDownloadGitHub

What the team does on GitHub

Hangar Floor is made to own the day-to-day work of a repo. The coordinator session acts through the GitHub CLI gh, with the login of the person who runs it. Each action on GitHub is an action of that account.

Read this page before the setup. The skill shows it to the owner and waits for a yes.

What the sessions do

WhoWhat it does on GitHub
The coordinatorMakes, edits, and closes issues. Makes, edits, and closes milestones, and moves issues between them. Comments on pull requests. Merges pull requests into the main branch, by rebase. Deletes the branch of a merged pull request. Pushes the version change of a release. Makes tags and pushes them. Pushes the data branch of the status page, when the page reads its data from GitHub. Reads the runs and the logs of the CI, and starts a run again. Edits the notes of a release.
A workerPushes branches. Opens pull requests. Pushes more commits to its own branches. Comments on issues and pull requests.
Each sessionReads the code, the issues, the pull requests, the checks, and the releases.

A release workflow of the repo, started by a tag of the coordinator, publishes what that workflow publishes: release files, packages, a site.

The rules of engagement

A repo has issues and pull requests of other people too. At the setup, the coordinator asks the owner which ones the team may act on, and writes the answer into PROCESS.md. It asks again when a case does not fit the rule.

RuleThe team acts on
Owner only (the default)Issues and pull requests that the account of the login opened, and those that the team opened itself
Named peopleThe same, plus the items of the accounts that the owner lists
A labelThe same, plus each item with a label that the owner sets, such as team. Only a person with write access can set a label, so the label is the owner's go.
EverythingEach open issue and pull request of the repos

"Acts on" means: plans it, assigns it, changes its milestone and labels, comments, closes it, and for a pull request tests and merges it.

For each item outside the rule, the team only reads. It lists the item for the owner on the status page, with a one-line summary, and waits. It does not comment, label, close, or merge it, and no work starts from it.

Two more rules hold under every choice:

What gh needs

gh auth status shows the login and its scopes. The team needs these:

AccessWhy
Read and write of the code (repo, or Contents: read and write of a fine-grained token)Branches, the merge, the version change, tags, and release notes
Pull requests: read and writeOpen, comment, merge, close
Issues: read and writeIssues and milestones
Actions: read and writeRead the runs and the logs, start a run again
Workflows: read and write (workflow)Only when a change edits a file of .github/workflows/
Metadata: readEach call

The team needs no access to the settings of the repo, to its secrets, to the members of the organization, or to other repos. A step that needs one of them is a step for the owner.

Limit the access

The safest setup gives the team its own narrow login:

  1. Make a fine-grained personal access token with the table above, for only the repos of the project. Or make a machine account that is a collaborator of only those repos.
  2. Give it to gh in the sessions of the team: gh auth login --with-token, or the variable GH_TOKEN.
  3. Keep your own login for the settings, the secrets, and the other repos.

With your own full login, the team can do on GitHub what you can do. The rules of this page and the protection of the main branch are then the only limits.

Protect the main branch

Rules of the repo hold even when a session makes a mistake. Good ones for this work model:

The owner sets these. The team does not change the settings of a repo.

What the team does not do without the owner's word

The record

Each action is in the history of GitHub under the account of the login: the merge, the comment with the result of the gate, the tag. The status page lists the merges and the releases of the day, and the questions that wait for the owner.

Stop the team

Next: the limits, on the doc site.