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> |
||
|---|---|---|
| .. | ||
| attestation.go | ||
| attestation_integration_test.go | ||
| attestation_test.go | ||
| options.go | ||
| options_test.go | ||
| policy.go | ||
| policy_test.go | ||
| verify.go | ||
| verify_integration_test.go | ||
| verify_test.go | ||