Skip to content

gh api output is truncated, breaking programmatic use #199

@JulienCr

Description

@JulienCr

Description

When gh api commands are proxied through rtk gh api, the output gets truncated. This breaks programmatic use cases where the full output is needed, such as retrieving PR bodies to update them.

Reproduction

# Direct — returns full body
gh api repos/OWNER/REPO/pulls/123 --jq '.body'

# Via rtk — output is truncated with "... (truncated)"
rtk gh api repos/OWNER/REPO/pulls/123 --jq '.body'

Impact

Commands like gh api ... --jq '.body' are used to retrieve PR bodies for editing. When truncated, the data is unusable and the PR body gets corrupted on update.

Expected behavior

gh api output should either:

  1. Be passed through unfiltered (since API responses are typically consumed programmatically, not by humans)
  2. Or respect --jq output as a signal that the user needs exact output

Workaround

Currently excluding gh api from the rtk rewrite hook entirely.

Environment

  • rtk 0.21.1
  • gh 2.x
  • macOS (darwin arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions