-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
gh-labelrelating to the gh label commandrelating to the gh label commandplatformProblems with the GitHub platform rather than the CLI clientProblems with the GitHub platform rather than the CLI client
Description
Describe the bug
using gh label list --search "search-term" returns labels that do not contain "search-term"
Affected version
❯ gh version
gh version 2.82.0 (2025-10-15)
Steps to reproduce the behavior
- Type this:
gh label list --search "prose" --json name,description - View the output
[
{
"description": "",
"name": "markdown/prose"
},
{
"description": "",
"name": "automated pr"
}
]
- See error - "automated pr" does not contain the string "prose" and does not contain a single "s" character.
Expected vs actual behavior
In this case I expect only those labels that contain the string "prose" in either the label name or description to be returned. Actual behavior is I'm seeing completely unrelated labels being returned.
Logs
Paste the activity from your command line. Redact if needed.
❯ export GH_DEBUG=true; gh label list --search "prose" --json name,description
[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
* Request at 2025-10-20 15:45:58.050019 -0500 CDT m=+0.135239702
* Request to https://api.github.com/graphql
* Request took 460.837393ms
⣾* Request at 2025-10-20 15:45:58.554024 -0500 CDT m=+0.639229895
* Request to https://api.github.com/graphql
⣻* Request took 263.224654ms
[
{
"description": "",
"name": "markdown/prose"
},
{
"description": "",
"name": "automated pr"
}
]
I can replicate this behavior by misspelling the search phrase, or by trying other search strings that should match a given number of labels but the actual results contains results that do not contain the search phrase.
Metadata
Metadata
Assignees
Labels
gh-labelrelating to the gh label commandrelating to the gh label commandplatformProblems with the GitHub platform rather than the CLI clientProblems with the GitHub platform rather than the CLI client