Merge pull request #19478 from RoadieHQ/sort-search-results-azure
Improve consistency of results from azure provider
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-azure': patch
|
||||
---
|
||||
|
||||
Improve consistency of results from the `AzureDevOpsEntityProvider`.
|
||||
@@ -63,6 +63,12 @@ describe('azure', () => {
|
||||
expect(req.headers.get('Authorization')).toBe('Basic OkFCQw==');
|
||||
expect(req.body).toEqual({
|
||||
searchText: 'path:/catalog-info.yaml repo:* proj:engineering',
|
||||
$orderBy: [
|
||||
{
|
||||
field: 'path',
|
||||
sortOrder: 'ASC',
|
||||
},
|
||||
],
|
||||
$skip: 0,
|
||||
$top: 1000,
|
||||
});
|
||||
@@ -122,6 +128,12 @@ describe('azure', () => {
|
||||
expect(req.headers.get('Authorization')).toBe('Basic OkFCQw==');
|
||||
expect(req.body).toEqual({
|
||||
searchText: 'path:/catalog-info.yaml repo:* proj:engineering',
|
||||
$orderBy: [
|
||||
{
|
||||
field: 'path',
|
||||
sortOrder: 'ASC',
|
||||
},
|
||||
],
|
||||
$skip: 0,
|
||||
$top: 1000,
|
||||
});
|
||||
@@ -171,6 +183,12 @@ describe('azure', () => {
|
||||
expect(req.body).toEqual({
|
||||
searchText:
|
||||
'path:/catalog-info.yaml repo:backstage proj:engineering',
|
||||
$orderBy: [
|
||||
{
|
||||
field: 'path',
|
||||
sortOrder: 'ASC',
|
||||
},
|
||||
],
|
||||
$skip: 0,
|
||||
$top: 1000,
|
||||
});
|
||||
@@ -220,6 +238,12 @@ describe('azure', () => {
|
||||
expect(req.headers.get('Authorization')).toBe('Basic OkFCQw==');
|
||||
expect(req.body).toEqual({
|
||||
searchText: 'path:/catalog-info.yaml repo:* proj:engineering',
|
||||
$orderBy: [
|
||||
{
|
||||
field: 'path',
|
||||
sortOrder: 'ASC',
|
||||
},
|
||||
],
|
||||
$skip: 0,
|
||||
$top: 1000,
|
||||
});
|
||||
|
||||
@@ -70,6 +70,12 @@ export async function codeSearch(
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
searchText: `path:${path} repo:${repo || '*'} proj:${project || '*'}`,
|
||||
$orderBy: [
|
||||
{
|
||||
field: 'path',
|
||||
sortOrder: 'ASC',
|
||||
},
|
||||
],
|
||||
$skip: items.length,
|
||||
$top: PAGE_SIZE,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user