Skip to content

Document that queries use new search syntax - #8858

Merged
Alex Ross (alexr00) merged 5 commits into
mainfrom
copilot/fix-multi-author-search
Jul 24, 2026
Merged

Document that queries use new search syntax#8858
Alex Ross (alexr00) merged 5 commits into
mainfrom
copilot/fix-multi-author-search

Conversation

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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 as AND, so repeated authors are impossible to satisfy for a single-author PR; the legacy API used to OR them.

Changes

  • getPRFetchQuery (src/github/utils.ts): New combineAuthorQualifiers step folds repeated positive author: qualifiers into a single OR group before assembling the query.
    • Single author: is unchanged.
    • Negated -author: keeps AND/exclusion semantics and is excluded from the group.
    • Runs after ${user} substitution.
  • Tests (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:

is:pull-request repo:owner/repo is:open (author:name1 OR author:name2 OR author:name3) type:pr

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI linked an issue Jul 23, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits July 23, 2026 17:08
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix multi author search functionality Restore multi-author search by OR-combining repeated author: qualifiers Jul 23, 2026
@alexr00

Alex Ross (alexr00) commented Jul 23, 2026

Copy link
Copy Markdown
Member

Copilot No, don't restore the search. Instead, just add the documentation.

@alexr00

Copy link
Copy Markdown
Member

Copilot No, don't restore the search. Instead, just add the documentation.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Copilot No, don't restore the search. Instead, just add the documentation.

Reverted the search code changes and instead documented the OR syntax for matching multiple authors in the githubPullRequests.queries setting description. Done in 7160f8b.

Copilot No, don't restore the search. Instead, just add the documentation.

Reverted the search code changes and documented the OR syntax for matching multiple authors in the githubPullRequests.queries setting description instead. Done in 9779483.

@alexr00
Alex Ross (alexr00) marked this pull request as ready for review July 24, 2026 08:48
Copilot AI review requested due to automatic review settings July 24, 2026 08:48
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) July 24, 2026 08:48
@alexr00 Alex Ross (alexr00) changed the title Restore multi-author search by OR-combining repeated author: qualifiers Document that queries use new search syntax Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AND under 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

Comment thread package.nls.json
Comment thread package.nls.json
Copilot AI requested review from Copilot and removed request for Copilot July 24, 2026 08:51
@alexr00
Alex Ross (alexr00) merged commit b0da990 into main Jul 24, 2026
7 checks passed
@alexr00
Alex Ross (alexr00) deleted the copilot/fix-multi-author-search branch July 24, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multi author search stopped working

4 participants