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.
Fixesgithub/cli#1111
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit changes <github.com> and <ghe.com> references to `github.com` and `ghe.com` so they are visible on the GitHub CLI marketing website.
GitHub Pages will render URLs with a protocol as clickable links, however hostnames are treated as HTML elements and not rendered.
This commit converts all of the places using ColorScheme.Gray and ColorScheme.Grayf to Muted and Mutedf.
There is a little extra tidying up with local variable names or converting code to use Mutedf format.
This commit implements the actual changes around configuration setting / environment variable logic for displaying labels using their RGB hex color code in terminals with truecolor support.
One of the subtler changes in this commit is renaming generic ColorScheme.HexToRGB logic to render truecolor to ColorScheme.Label as this feature was being used exclusively for labels. This is due to confusion about introducing the new `color_labels` config on top of generic coloring logic.
There are no code changes required to make this work. I added a test
specifying `<owner>/<number>` and nothing failed. Any syntax issues are
returned by the api with a generic message:
```
Invalid search query "project:\"<string>\" type:issue".
An invalid project was specified.
```
This, combined with the updated docstring, should be sufficient for users
to troubleshoot any issues with the `--project` flag syntax
There are no code changes required to make this work. I added a test
specifying `<owner>/<number>` and nothing failed. Any syntax issues are
returned by the api with a generic message:
```
Invalid search query "project:\"<string>\" type:pr".
An invalid project was specified.
```
This, combined with the updated docstring, should be sufficient for users
to troubleshoot any issues with the `--project` flag syntax
Found with
rg '(^ | \t|\t )' -g '*.go' -g '!*_test.go'
Mixed indent exceptions:
- wrapped long list items with extra 2-space indent
- code snippets using space indent
- commented code lines having "\t*// \t+" prefix