Skip to content

Commit

Permalink
feat(nexus): sort artifacts by most recent first by default (janus-id…
Browse files Browse the repository at this point in the history
…p#829)

* sort nexus artifacts by most recent first by default

* update tests
  • Loading branch information
mjhumkhawala-ias authored Oct 13, 2023
1 parent 2b96df7 commit 01c28c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ describe('useNexusRepositoryManagerAppData', () => {
title: 'janus-idp/backstage-showcase',
query: {
dockerImageName: 'janus-idp/backstage-showcase',
sort: 'version',
},
});
});
Expand Down Expand Up @@ -99,6 +100,7 @@ describe('useNexusRepositoryManagerAppData', () => {
query: {
dockerImageName: 'janus-idp',
dockerImageTag: 'latest',
sort: 'version',
},
});
});
Expand Down Expand Up @@ -126,6 +128,7 @@ describe('useNexusRepositoryManagerAppData', () => {
title: 'Custom Title',
query: {
dockerImageName: 'janus-idp/backstage-showcase',
sort: 'version',
},
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const useNexusRepositoryManagerAppData = ({

acc.repositories.push(repository);
const query = v.query
? Object.assign(acc.query, v.query(repository))
? Object.assign(acc.query, v.query(repository), { sort: 'version' })
: acc.query;

return {
Expand Down

0 comments on commit 01c28c2

Please sign in to comment.