feat(cli): install the organization's GitHub App from the CLI
Merged
SA
1mo ago+145+145+012345678901234567890123456789-2-2-0123456789
Summary
- New internal-audience group
superset integrations, starting withgithub connect|status|disconnectfor the organization's GitHub App. This is notsuperset connections github, which is a person's own GitHub account. - Cloud environments can only check out repos the org's App can see. Until now, installing the App meant going through the web Integrations page, so a CLI-only setup got stuck at "No repositories connected".
How it works
connectopens/api/github/install?organizationId=…, the same URL the web Integrations page uses. It then pollsintegration.github.getInstallationuntil the row exists, for up to 10 minutes.--no-waitjust prints the URL.- The route authenticates with the browser's Superset session, so the browser must be signed in (as with
plugins connect). - If the org already has an installation, it reports that instead.
- The route authenticates with the browser's Superset session, so the browser must be signed in (as with
statusshows the installation's account and the repo count.disconnectasks you to type the account name in a terminal, or needs--yeswithout one, because it removes the repos from every environment in the org. The server still restricts it to org admins.environments reposnow points an org with no repos atsuperset integrations github connect.- Existing guard: the callback already refuses an installation that another org owns, so choosing
superset-shfrom a test org can't take it away from Superset.
Manual QA (against production, read-only)
-
integrations github statusin Superset: "Installed on superset-sh; 23 repositories". -
integrations github statusin App Review: "not installed", pointing toconnect. -
integrations github connect --no-waitin App Review prints the install URL for that org. - The full browser install into App Review: next, during the onboarding dry run.
Testing
bun run typecheck(cli)biome check
Summary by cubic
Adds superset integrations github connect|status|disconnect to install the organization's GitHub App from the CLI, so a CLI-only setup no longer gets stuck at "No repositories connected" — previously the only way to install the App was the web Integrations page.
connectopens the same install URL the web Integrations page uses and polls until the installation exists, up to 10 minutes;--no-waitonly prints the URL.statusshows the account the App is installed on and the repo count;disconnectasks you to type the account name, or needs--yeswithout a terminal, because it removes the repos from every environment in the org.environments reposnow points at the new connect command instead of Settings.- Both connect commands now frame the URL as a fallback ("If your browser did not open…") rather than claiming the browser opened the page.
Summary by CodeRabbit
- New Features
- Added CLI commands to connect a GitHub App installation, check its status and connected repositories, and disconnect it. You can wait for setup to finish or get instructions to complete it later.
- Added
integrationsto the CLI’s account and app help command list.
- Improvements
- Updated the recovery hint shown when no repositories are connected to direct you to the GitHub integration connect command.
- Clarified whether to open the GitHub authorization link when the browser does not open automatically.