docs(search): add note for exclusion search syntax

This commit is contained in:
Sukh 2025-06-23 13:19:37 -04:00
parent 1b94463127
commit 45876eddc2
5 changed files with 15 additions and 0 deletions

View file

@ -46,6 +46,9 @@ func NewCmdCode(f *cmdutil.Factory, runF func(*CodeOptions) error) *cobra.Comman
Note that these search results are powered by what is now a legacy GitHub code search engine.
The results might not match what is seen on %[1]sgithub.com%[1]s, and new features like regex search
are not yet available via the GitHub API.
Note: When using GitHub search syntax to exclude results (e.g. '-language:xml'), you must use
a '--' delimiter before the search query to separate it from command flags.
`, "`"),
Example: heredoc.Doc(`
# Search code matching "react" and "lifecycle"

View file

@ -45,6 +45,9 @@ func NewCmdCommits(f *cmdutil.Factory, runF func(*CommitsOptions) error) *cobra.
GitHub search syntax is documented at:
<https://docs.github.com/search-github/searching-on-github/searching-commits>
Note: When using GitHub search syntax to exclude results (e.g. '-user:monalisa'), you must use
a '--' delimiter before the search query to separate it from command flags.
`),
Example: heredoc.Doc(`
# Search commits matching set of keywords "readme" and "typo"

View file

@ -34,6 +34,9 @@ func NewCmdIssues(f *cmdutil.Factory, runF func(*shared.IssuesOptions) error) *c
GitHub search syntax is documented at:
<https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests>
Note: When using GitHub search syntax to exclude results (e.g. '-label:bug'), you must use
a '--' delimiter before the search query to separate it from command flags.
`),
Example: heredoc.Doc(`
# Search issues matching set of keywords "readme" and "typo"

View file

@ -36,6 +36,9 @@ func NewCmdPrs(f *cmdutil.Factory, runF func(*shared.IssuesOptions) error) *cobr
GitHub search syntax is documented at:
<https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests>
Note: When using GitHub search syntax to exclude results (e.g. '-label:bug'), you must use
a '--' delimiter before the search query to separate it from command flags.
`),
Example: heredoc.Doc(`
# Search pull requests matching set of keywords "fix" and "bug"

View file

@ -46,6 +46,9 @@ func NewCmdRepos(f *cmdutil.Factory, runF func(*ReposOptions) error) *cobra.Comm
GitHub search syntax is documented at:
<https://docs.github.com/search-github/searching-on-github/searching-for-repositories>
Note: When using GitHub search syntax to exclude results (e.g. '-topic:linux'), you must use
a '--' delimiter before the search query to separate it from command flags.
`),
Example: heredoc.Doc(`
# Search repositories matching set of keywords "cli" and "shell"