Skip to content

app/: github:link-installation staff command - #151

Merged
ndbroadbent merged 1 commit into
mainfrom
staff-link-installation
Dec 3, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
staff-link-installation

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

A staff command for what production's docspring needed at cutover: link a GitHub App installation to an organization made by hand. Without the link, its admins' checklists would offer "Already installed on DocSpring: Set it up", and that would create a second organization. The docspring row itself was written by hand today, through talira infra. This command means the next one doesn't need SQL.

visualci-app github:link-installation --installation <id> --org <slug> --account-id <id> --account-login <login> \
  --account-type <Organization|User> [--set-up-by <email or GitHub login>] --reason "<why>"
  • Upserts github_installations with the organization, the account and set_up_by, keeping an existing set_up_by, as setting it up in the app does. The checklist's install step then counts as done there.
  • Refuses an installation already set up for another organization ("not moving it"), an account type other than Organization or User, non-numeric IDs, an unknown --set-up-by and an empty reason.
  • Writes an admin_audit row: tool github:link-installation, client console, the arguments and the reason. The row is written in the same transaction as the link.
  • Running it again changes nothing more (another audit row aside).
  • docs/deploy.md lists it with the other staff commands.

Test: staff_commands::github_link_installation_links_audits_and_refuses_a_move. Tests, fmt and clippy pass on docspring-dev.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

… App installation as set up for an organization
@ndbroadbent
ndbroadbent force-pushed the staff-link-installation branch from d385bc7 to 0b9cc07 Compare December 3, 2026 22:22
@ndbroadbent
ndbroadbent merged commit 52ece9a into main Dec 3, 2026
14 checks passed
@ndbroadbent
ndbroadbent deleted the staff-link-installation branch December 3, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant