Commit graph

79 commits

Author SHA1 Message Date
William Martin
3ed389d664 Disable telemetry for GHES 2026-04-17 11:50:24 +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
Babak K. Shandiz
2c08f20c33
docs(search prs): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:37:37 +01:00
Babak K. Shandiz
cc60d9c3fa
docs(search issues): mention advanced issue search syntax support
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 18:37:17 +01:00
Babak K. Shandiz
87bd76c5aa
docs: add cleanup/future TODO marks for advanced issue search changes
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-01 13:55:49 +01:00
Babak K. Shandiz
3573fdfbb0
docs(search prs): mention advanced issue search takeover
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 15:35:33 +01:00
Babak K. Shandiz
99daa74b00
docs(search issues): mention advanced issue search takeover
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 15:35:17 +01:00
Babak K. Shandiz
188098d592
test(search): provide feature detection dependency
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 12:25:43 +01:00
Babak K. Shandiz
257f143711
fix(search): add feature detection dependency
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 12:24:05 +01:00
Kynan Ware
4dde0871bd Fix linter 2025-08-06 10:32:46 -06:00
Kynan Ware
3d9bd69e11
Update pkg/cmd/search/search.go 2025-08-06 10:28:56 -06:00
Sukh
6e400eb4a1 docs(search): move search syntax note to gh search --help 2025-08-02 03:01:40 -04:00
Sukh
dd0a0b3045 docs(search): add reference to gh help search 2025-07-25 19:55:23 -04:00
Sukh
45876eddc2 docs(search): add note for exclusion search syntax 2025-07-25 17:03:33 -04:00
Kynan Ware
7f97bcfcd6
doc: remove codenames from code comments 2025-07-17 12:00:17 -06:00
Sam Coe
e2b444452d
Add additional test case for when extension is prefixed with a dot 2025-07-17 17:32:48 +02:00
Sam Coe
723d0e861b
Merge branch 'trunk' into fix-web-code-search-filename-extension-flags 2025-07-17 10:21:46 +02:00
Andy Feller
313d20ba83 Ensure hostnames are visible in CLI website
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.
2025-07-14 08:33:20 -04:00
Sam Coe
f87451ff56
Simplify path qualifier building logic 2025-07-10 12:33:08 +02:00
Sam Coe
545b420ff8
Transform extension and filename qualifiers into path qualifier 2025-07-03 07:43:35 +02:00
Andy Feller
47225bcf56
Merge pull request #10737 from cli/andyfeller/muted-text-part2-github-cli-833
Ensure muted text is thematic and customizable
2025-04-08 16:59:36 -04:00
Andy Feller
918cafc222 Deprecate ColorScheme.Gray for ColorScheme.Muted
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.
2025-04-06 10:18:48 -04:00
Andy Feller
3eca268a7f Introduce color_labels support, update commands
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.
2025-04-02 18:24:20 -04:00
Azeem Sajid
33c30d5bd1 Inconsistent format of examples in help text 2025-02-27 16:26:25 +05:00
Tyler McGoffin
e047d4a611
Merge pull request #10429 from iamazeem/8404-standardize-urls
Standardize URLs
2025-02-13 10:49:18 -08:00
Azeem Sajid
8b7fb231ec Remove trailing whitespace 2025-02-13 11:06:27 +05:00
Azeem Sajid
026f64ce6f Standardize URLs 2025-02-13 10:41:53 +05:00
Heath Stewart
9e00f1e4f2
Resolve PR feedback 2024-10-14 15:08:23 -07:00
Heath Stewart
70b14215ec
Print filtered gists similar to code search 2024-10-12 23:17:56 -07:00
Andy Feller
779a1203b6
Merge pull request #9471 from heaths/issue9470
Always print URL scheme to stdout
2024-08-21 14:46:52 -04:00
Heath Stewart
81f3526740
Fix tests 2024-08-16 10:11:52 -07:00
Tyler McGoffin
c838da9ee1 Update gh search issues --project flag doc to specify owner/number 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: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
2024-08-12 14:51:27 -07:00
Tyler McGoffin
e5248b8fd4 Update gh search prs --project flag doc to specify owner/number 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
2024-08-12 14:51:03 -07:00
Yukai Chou
d7b8ecf33d Unify use of tab indent in non-test source files
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
2024-08-03 00:35:30 +08:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Stuart Leitch
cfd2d645b2 Clarify helptext for gh search issues and gh search repos regarding archived repos 2024-02-29 22:38:55 +00:00
Stuart Leitch
19367c6458 fixed whitespace 2024-02-21 23:31:57 +00:00
Stuart Leitch
25c1610e37 Clarify helptext for search prs regarding archived repos 2024-02-21 23:17:19 +00:00
Shion Ichikawa
29bd9dc6eb
search repos command add usage example for --archived=false (#8391) 2024-01-17 19:53:26 +00:00
Yukai Chou
21bf1babdf Proof-reading 2023-11-17 02:04:35 +08:00
Heath Stewart
7738b6187c
Add headers to all tables (#8157) 2023-10-20 11:20:02 +02:00
Mislav Marohnić
94a6312eaf
💅 json export 2023-06-09 17:36:19 +02:00
Mislav Marohnić
e2b2bc0071
fix tests 2023-05-10 16:20:51 +02:00
Mislav Marohnić
e2c8b16c4b
Print empty line between file headers 2023-05-10 16:04:57 +02:00
Mislav Marohnić
9d5eb0b784
💅 improve code search output 2023-05-10 15:51:53 +02:00
Josh Kraft
88887c8d55 incorporate code review feedback 2023-05-08 18:04:52 -06:00
Josh Kraft
43d5345b8b remove empty line 2023-04-26 19:55:27 -06:00
Josh Kraft
d82c65ac2f change highlight color 2023-04-26 19:15:31 -06:00
Josh Kraft
b0396d9af2 adopt changes to User 2023-04-26 18:55:33 -06:00
Josh Kraft
b8f86f54ad Merge branch 'trunk' into gh-search-code 2023-04-26 18:48:24 -06:00