Skip to content

Add GitHub CLI authentication diagnostics to basectl doctor --dev #262

@codeforester

Description

@codeforester

Problem

Base's documented GitHub workflow prefers basectl gh for issue, branch, and PR work. The developer prerequisite manifest checks whether the gh tool is installed, but it does not verify whether the local GitHub CLI authentication is usable.

During review, basectl gh issue list failed because the local token was invalid:

ERROR: GitHub CLI authentication is not ready.
ERROR: Run 'gh auth login -h github.com' and retry.

That is a good error at command time, but basectl doctor --dev should catch this earlier because GitHub access is part of the Base contributor workflow.

Fix

Extend dev diagnostics to include a GitHub auth check when gh is installed:

gh auth status

Report a clear error/fix if authentication is missing or invalid, for example:

Fix: gh auth login -h github.com

This may belong in the base_dev layer or in the Bash gh subcommand helpers reused by doctor.

Acceptance Criteria

  • basectl doctor --dev reports an error when gh is installed but unauthenticated or has an invalid token.
  • basectl check --dev --format json includes structured status for the GitHub auth check.
  • The check remains non-interactive and does not attempt to log in automatically.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions