Document that queries use new search syntax - #8858
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
author: qualifiers
|
Copilot No, don't restore the search. Instead, just add the documentation. |
|
Copilot No, don't restore the search. Instead, just add the documentation. |
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Reverted the search code changes and instead documented the
Reverted the search code changes and documented the |
author: qualifiersThere was a problem hiding this comment.
Pull request overview
Updates the user-facing documentation for githubPullRequests.queries to clarify that PR category queries are executed using GitHub’s advanced search semantics, and how to express “match any of these values” using OR.
Changes:
- Document that spaces between qualifiers are treated as
ANDunder advanced search. - Add guidance and an example custom query demonstrating how to match multiple values with
OR. - Update the sample queries shown in the setting description accordingly.
Show a summary per file
| File | Description |
|---|---|
| package.nls.json | Updates the settings markdown description for githubPullRequests.queries to explain advanced search AND/OR behavior and provide an example query. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Low
Custom PR queries with multiple
author:qualifiers (e.g.author:name1 author:name2 author:name3) stopped returning results in 0.146.0, when PR category search switched to GitHub's advanced search (advanced_search: 'true'). Advanced search treats a space between qualifiers asAND, so repeated authors are impossible to satisfy for a single-author PR; the legacy API used toORthem.Changes
getPRFetchQuery(src/github/utils.ts): NewcombineAuthorQualifiersstep folds repeated positiveauthor:qualifiers into a single OR group before assembling the query.author:is unchanged.-author:keepsAND/exclusion semantics and is excluded from the group.${user}substitution.src/test/github/utils.test.ts): cover multiple/single/negated/mixed authors and${user}substitution.For a configured query:
{ "label": "Created By My Team", "query": "repo:${owner}/${repository} is:open author:name1 author:name2 author:name3" }the fetched query becomes: