-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Describe the bug
When using gh issue list --state all --search with OR operators, the command incorrectly searches across multiple repositories instead of limiting the search to the current repository context.
This only happens in this exact combination, e.g. not with AND
This seems very weird and might possibly show issues I should not have access to, but I am neither able to nor interested in reverse engineering this to find out.
Affected version
gh version 2.79.0 (2025-09-08)
https://github.com/cli/cli/releases/tag/v2.79.0
Steps to reproduce the behavior
- Navigate to any repository directory
- Run: gh issue list (shows ~30 issues for me, highest 133, shown in logs below)
- Run: gh issue list --state all --search "gui OR architecture OR refactor OR event" --limit 20 (also works with other combinations, shown in logs below)
Expected vs actual behaviour
Expected:
Should return only issues from the current repository that match the search criteria.
Actual:
- Returns ~1.8M total issues
- Includes issues from other repositories with titles unrelated to current repo
- Shows impossible duplicate issue numbers (multiple 1s, 20s, etc.)
- Example: Issue 20 shows "Architectural: Refactor Application to Microservices Architecture" but actual repo issue 20 is "Detection of which template to use for document creation is not working"
Logs
(Edited to remove excessive whitespace from table shown in terminal)
-
Normal output from issue listing:
gh issue list
Showing 30 of 36 open issues in Tommynem/VaWW
ID TITLE ...
133 [FEATURE] Integrate is_firm boolean into the filter menu ...
129 [BUG] Fields highlighter uses non-existent border_color to highlight errors ...
128 [FEATURE] Variable amounts of test data generated ... -
Broken command:
gh issue list --state all --search "gui OR architecture OR refactor OR event" --limit 20
Showing 20 of 1845031 issues in Tommynem/VaWW that match your search
ID, TITLE, ...
105 Architecture: Split EventHandler into domain-specific modules ...
2 Refactor architecture ...
1124 REF/GUI: General refactors of GUI and GUI testing ...
...
1 Refactor monolithic architecture into modular components
1 Refactor application to MVC architecture
(There are a lot of duplicates, clearly from different repos if the 1.8M entries didnt give it away)
Edit: removed hashtags from issue numbers to stop GitHub from automatically associating them with actual issues from this repo.