Sub topic 7
Finding Issues with Search and Filters
This chapter assumes you can create issues, apply labels, and set assignees and milestones. You also need a terminal with the GitHub CLI installed for the last example.
How issue search works
The search bar on a repository's Issues tab takes a query made of free text and qualifiers. A qualifier is a key:value pair that narrows results. The default query is is:issue is:open. Every qualifier you add must match, so each one shrinks the result set.
The Labels, Milestones, and Assignee dropdowns above the list do not use a separate system. They rewrite the text in the search bar. You can learn the syntax by choosing a filter from a dropdown and reading the query it produces.
Common qualifiers
| Qualifier | Meaning |
|---|---|
| `is:open`, `is:closed` | Filter by state |
| `label:bug` | Has the label `bug` |
| `label:"good first issue"` | Quote values that contain spaces |
| `assignee:@me` | Assigned to you |
| `no:assignee` | Has no assignee |
| `milestone:"v1.0"` | Belongs to that milestone |
| `author:octocat` | Opened by that user |
| `mentions:octocat` | Mentions that user |
| `in:title` | Restricts free-text matching to the title |
| `comments:>5` | More than five comments |
| `created:>2026-01-01` | Opened after that date |
Put a minus sign in front of a qualifier to exclude matches, as in -label:wontfix. Separate multiple values for one qualifier with commas to match any of them, as in label:bug,regression. Repeating a qualifier, as in label:bug label:urgent, requires both labels.
A worked query
This query lists open bugs assigned to you, most recently updated first:
is:issue is:open label:bug assignee:@me sort:updated-descTo find unowned bugs that need attention, change the assignee part and exclude a label:
is:issue is:open label:bug no:assignee -label:wontfixTo search by words, add them to the query. The query date validation in:title matches only issues whose title contains both words.
Sorting
The sort: qualifier accepts created, updated, and comments, each with -asc or -desc. For example, sort:comments-desc puts the most discussed issues first. Use sort:created-asc to find the oldest open work.
Keeping a filter for reuse
A query appears in the page URL, so you can bookmark it or share the link. A bookmark is the simplest saved filter.
For filters your team uses repeatedly, use a GitHub Project. A project view stores its filter, sorting, and layout, so everyone sees the same results. Chapter 11 covers projects.
Searching from the terminal
The GitHub CLI accepts the same syntax through --search. The --label, --assignee, and --state flags cover common cases.
gh issue list --search "is:open label:bug no:assignee sort:updated-desc"
gh issue list --label bug --assignee @me --state openQuote the whole search string so your shell does not split it or interpret special characters.
Common errors
- Empty results. Check whether a quoted value is misspelled. A label such as
good first issueneeds quotes, or only the first word is treated as the value. - Closed issues missing. The default query includes
is:open. Remove it, or useis:closed, to see other states. - Pull requests mixed in. The Pull requests tab is separate, but a global search can return both. Add
is:issueto exclude pull requests. - Wrong date format. Dates use
YYYY-MM-DD. Ranges use2026-01-01..2026-03-31.
Exercise
Write a query that lists closed issues labeled bug that were opened by octocat, oldest first.
Show answer
is:issue is:closed label:bug author:octocat sort:created-asc
Exercise
Your team wants everyone to see "open issues in milestone v1.0 with no assignee" in the same way every time. Which GitHub feature stores that filter for the whole team?
Show answer
A GitHub Project view. It saves the filter, for example is:open milestone:"v1.0" no:assignee, so all members see the same results. A bookmarked URL also works but is personal.