Skip to content

Commit

Permalink
fix(gerrit): include prTitle in search for changes (findPr) (#26745)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiasSt90 committed Jan 19, 2024
1 parent d59316e commit faa1618
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/modules/platform/gerrit/client.spec.ts
Expand Up @@ -111,6 +111,13 @@ describe('modules/platform/gerrit/client', () => {
state: 'closed' as FindPRConfig['state'],
},
],
[
'message:fix(deps): update dependency react-router-dom to v6.21.2',
{
branchName: 'dependency-xyz',
prTitle: 'fix(deps): update dependency react-router-dom to v6.21.2',
},
],
])(
'query contains %p',
async (expectedQueryPart: string, config: GerritFindPRConfig) => {
Expand Down
3 changes: 3 additions & 0 deletions lib/modules/platform/gerrit/client.ts
Expand Up @@ -234,6 +234,9 @@ class GerritClient {
if (searchConfig.label) {
filters.push(`label:Code-Review=${searchConfig.label}`);
}
if (searchConfig.prTitle) {
filters.push(`message:${encodeURIComponent(searchConfig.prTitle)}`);
}
return filters;
}
}
Expand Down

0 comments on commit faa1618

Please sign in to comment.