Consolidate API Client usage · Issue #13991 · cli/cli · GitHub
Skip to content

Consolidate API Client usage #13991

Closed

Description

@williammartin

Description

For reasons (mostly just being a long lived project afaik), there are a lot of commands that interact with the GitHub API directly via an http.Client rather than the api.Client (and associated go-gh api.Client underneath). This hasn't really been an issue, but now does present a challenge in supporting behaviour that should cross all API requests.

We should pay down some of this debt by trying to consolidate all (may end up being limited to most) API interactions behind the api client (or a similar abstraction).

There are a series of commands that should hopefully be lift-and-shift, and some that will require some more rework no longer having access to the original raw http response.

Expected Output

All (or most) api interactions go through the api client.

A comment is left on this issue explaining any interactions that could not go through the same api client.

Activity

  1. added
    coreThis issue is not accepting PRs from outside contributors
    on Jul 28, 2026
  2. cli-triage commented on Jul 28, 2026

    @cli-triage

    Suggesting the enhancement label here - this is a technical debt/refactoring task to consolidate API interactions behind a shared api.Client abstraction rather than scattered http.Client usage. It's not a bug (nothing is broken), but an improvement to enable cross-cutting API behaviour (as linked in #13717). No duplicate issues were found tracking this specific consolidation effort.

    Generated by Issue Triage (skills-driven) for #13991 · sonnet46 · 19.1 AIC · ⌖ 4.04 AIC · ⊞ 5.5K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coreThis issue is not accepting PRs from outside contributorsstaletech-debtA chore that addresses technical debt

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions