Skip to content

[task] Add GitHub API adapter using gh api #4

@phongndo

Description

@phongndo

Goal

Add the first Rust adapter for reading GitHub data through gh api.

Why this matters

Nexgit's MVP is GitHub-first, but it should not make contributors solve token storage or OAuth before the app-server data shape is proven. gh api lets Nexgit reuse existing gh auth while keeping GitHub calls inside Rust-owned code.

Command/API target

Create a small adapter that can run REST and GraphQL gh api calls with explicit arguments and return stdout, stderr, and exit status in a testable shape.

Depends on

None. This is the foundation for the GitHub App-Server Data milestone.

Out of scope

  • Do not add octocrab or another GitHub client yet.
  • Do not implement issue, PR, checks, or review methods here.
  • Do not expose GitHub calls directly from desktop renderer code.

Definition of done

  • Rust code has one focused GitHub API adapter boundary.
  • Successful and failed gh api calls can be represented without panics.
  • Later issues can call the adapter instead of spawning gh directly.

Verification

  • cargo fmt --all --check
  • cargo check --workspace
  • A focused test or test double covers success and failure handling.

Contributor notes

This is maintainer-owned because it sets the implementation pattern for later contributor issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreShared Rust product logic and domain behavior.kind: maintenanceRepository maintenance or infrastructure work.maintainer onlyRepository administration or governance work reserved for maintainers.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions