Commit graph

16 commits

Author SHA1 Message Date
William Martin
acf2f730c1 Record accessibility state in telemetry
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-07 17:34:09 +02:00
Kynan Ware
7c439196c1
Merge pull request #13068 from 333fred/print-refresh-for-401s
Print `gh auth refresh` for 401 returns
2026-05-05 11:43:37 -06:00
William Martin
90ef03ea38
Enable telemetry without env var 2026-04-21 18:40:02 +01:00
William Martin
571bb1c923 Log when there is no telemetry 2026-04-21 18:15:04 +02:00
Fredric Silberberg
c139b17e9f
Apply patch from code review feedback. 2026-04-20 11:52:03 -07:00
Fredric Silberberg
a656271f26 Print gh auth refresh for 401 returns
`gh auth refresh` exists to make it simpler for users to refresh their tokens on expiration/scope mismatch, but help messages only suggest using it in limited scenarios, and not in a common case of a token expiring and the user receiving a 401 error. Now, the auth flow will detect this case, and for refreshable tokens (namely, tokens created by logging in with `gh auth login` in the first place), it will suggest using `gh auth refresh` for these cases.
2026-04-20 12:07:14 -06:00
William Martin
78f1ad537c Include CI context in telemetry 2026-04-20 12:02:56 +02:00
William Martin
17776cafc1 Apply review feedback
- Harden SpawnSendTelemetry against relative executable paths
- Use io.Copy for telemetry subprocess stdin write
- Clean up GH_TELEMETRY/DO_NOT_TRACK help text
- Fall back to built-in defaults (NoOp telemetry) on config load failure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 12:28:52 +02:00
William Martin
3ed389d664 Disable telemetry for GHES 2026-04-17 11:50:24 +02:00
William Martin
18dc5e77f0 Add sampled command telemetry 2026-04-16 21:42:46 +02:00
William Martin
c51769c977 Record agentic invocations in User-Agent header
Detect which AI coding agent is invoking gh by checking well-known
environment variables and include the agent name in the User-Agent
header sent to GitHub APIs.

Supported agents: Codex, Gemini CLI, Copilot CLI, OpenCode,
Claude Code, and Amp. Generic AI_AGENT env var is also supported
with validation to prevent header injection.

Fixes github/cli#1111

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:58:37 +01:00
Kynan Ware
22504bfa96 feat(update): add updateable build tag for update notifications 2025-05-26 09:45:00 -06:00
Andy Feller
1c32c986ec Capture greater detail on updaterEnabled
This commit expands the in-line docs around updaterEnabled package variable used to affect release checking.

Along with clarifying specific details discovered when talking with @williammartin, I'm also removing a useless local variable.
2025-01-10 13:55:16 -05:00
Andy Feller
c12e3694e8 Implement partial feedback before trunk update 2024-12-13 22:52:03 -05:00
Andy Feller
0d3f7cae4e Bring extension update check in line with gh check
This commit is a bit of refactoring to bring the extension update checking logic up to par with what is done with `gh` including creation of state file per extension and listening to env vars for disabling version checking.

This work is not complete as it does not address necessary test changes.
2024-11-17 16:10:58 -05:00
William Martin
d7465bdf3c Initial testscript introduction 2024-10-11 16:31:16 +02:00