Skip to content

feat: brainpod github auth and github repos - #28

Open
jeroenrinzema wants to merge 1 commit into
mainfrom
jeroenrinzema/cli-onboarding
Open

jeroenrinzema wants to merge 1 commit into
mainfrom
jeroenrinzema/cli-onboarding

Conversation

@jeroenrinzema

@jeroenrinzema jeroenrinzema commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Repository onboarding is moving to a Pod-scoped agent run: create a Pod, link a GitHub repository to it, then start the onboarding run. The first CLI step is finding the repository and fixing GitHub access, which is all this PR covers. Linking a repository, starting onboarding and following its runs come in a follow-up PR on top of this one.

How

  • brainpod github auth (GET /v1/github/installations): like gh auth status. It shows the BrainPod GitHub App installations, whether each grants all or selected repositories, any permissions not yet accepted, and each installation's GitHub settings link. Connecting GitHub is a browser flow, so it prints the console connect link (<dashboard>/github/signin) instead of authenticating.
  • brainpod github repos [QUERY] (GET /v1/github/repositories): lists or searches repositories, with hints for granting a missing one. In --json, id and installationId identify the repository to link to a Pod.

--json passes the API response through and adds _links.connect. describe metadata and the README are updated.

Depends on brainpodnl/brainpod#790.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The CLI can report failure after onboarding successfully completes, prompting unnecessary mutation retries, and fallback JSON errors omit installation recovery guidance.

2 open issues
What changed in this PR

Adds first-class CLI commands for GitHub access checks and repository onboarding, bringing the console workflow into the CLI through the public API.

Changes:

  • Adds GitHub installation reporting and paginated repository search with browser-based access guidance.
  • Adds onboarding start, status, and finish commands with progress and continuous-deploy pull request output.
  • Updates command metadata, documentation, and tests.
File Description
src/​output.rs Adds GitHub and onboarding renderers, guidance, and output tests.
src/​main.rs Emits contextual recovery guidance in error output.
src/​describe.rs Documents command requirements, effects, examples, and next steps.
src/​cmd/​mod.rs Implements commands, repository lookup, access guidance, and tests.
src/​client/​mod.rs Adds optional recovery guidance to API errors.
README.md Documents the new commands and onboarding workflow.

Review effort: Balanced

Comment thread src/cmd/mod.rs Resolved
Comment thread src/main.rs Resolved
@jeroenrinzema
jeroenrinzema force-pushed the jeroenrinzema/cli-onboarding branch from 0d1476d to f2af21d Compare November 26, 2026 14:25
@jeroenrinzema jeroenrinzema changed the title feat: github auth/repos and onboarding start/status/finish feat: brainpod github auth and github repos Nov 26, 2026
@jeroenrinzema
jeroenrinzema requested a balanced review from Copilot November 26, 2026 18:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The commands rely on an inaccessible backend PR and endpoints absent from the embedded API spec, requiring human verification of response contracts, pagination, authorization, and rollout compatibility.

2 open issues

Review effort: Balanced

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.

2 participants