-
Notifications
You must be signed in to change notification settings - Fork 338
Description
Summary
rtk gh api (native route) returns type placeholders instead of actual values for --jq output.
Examples: int, string, or object schemas like { tag_name: string }.
This breaks machine-readable automation.
Verified on
- Date: March 4, 2026 (Europe/Moscow)
- OS: WSL2 Linux x86_64
- gh version: 2.75.0
- rtk version: 0.22.2 (local)
- also reproduced with downloaded release binary: rtk 0.23.0
Reproduction
- Object projection returns placeholder schema
Command:
rtk gh api "/repos/rtk-ai/rtk/releases?per_page=1" --jq '.[0] | {tag_name,published_at}'
Actual output:
{
published_at: string,
tag_name: string
}
Expected output example:
{"published_at":"2026-02-28T21:10:20Z","tag_name":"v0.23.0"}
- Scalar projection returns placeholder type
Command:
rtk gh api search/issues --method GET -f q='repo:rtk-ai/rtk is:issue' -f per_page=1 --jq '.total_count'
Actual output:
int
Expected output:
104
Baseline comparison
Proxy path returns correct values with the same args:
-
rtk proxy gh api "/repos/rtk-ai/rtk/releases?per_page=1" --jq '.[0] | {tag_name,published_at}'
->{"published_at":"2026-02-28T21:10:20Z","tag_name":"v0.23.0"} -
rtk proxy gh api search/issues --method GET -f q='repo:rtk-ai/rtk is:issue' -f per_page=1 --jq '.total_count'
->104
Impact
- Breaks scripts that rely on exact JSON/scalar values from
gh api --jq. - Produces unusable output for automation pipelines.
Notes
This looks distinct from #199 (truncation). Here output is not truncated; values are replaced by type descriptors.