cli/pkg/cmd/api
William Martin 268453803e fix(api): propagate InvokingAgent in gh api HTTP client
The gh api command builds its own HTTP client inline without
forwarding InvokingAgent, so the User-Agent header was missing
the Agent/<name> suffix when invoked by AI coding agents.

Thread InvokingAgent through Factory → ApiOptions → HTTPClientOptions,
mirroring the existing AppVersion pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 16:55:16 +01:00
..
api.go fix(api): propagate InvokingAgent in gh api HTTP client 2026-03-26 16:55:16 +01:00
api_test.go fix(api): propagate InvokingAgent in gh api HTTP client 2026-03-26 16:55:16 +01:00
fields.go Add tests for non-happy field paths 2024-04-05 17:21:28 -04:00
fields_test.go Add tests for non-happy field paths 2024-04-05 17:21:28 -04:00
http.go Set default Accept header for api command when one is not specified (#8303) 2023-11-06 15:22:32 +01:00
http_test.go Set default Accept header for api command when one is not specified (#8303) 2023-11-06 15:22:32 +01:00
pagination.go Wrap JSON arrays, objects in array with --slurp 2024-04-04 01:26:05 -07:00
pagination_test.go Wrap JSON arrays, objects in array with --slurp 2024-04-04 01:26:05 -07:00