Skip to content

Commit

Permalink
feat(docker): Increase DockerHub items to 1000 per page (#24157)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov authored Aug 30, 2023
1 parent 44c7674 commit 8f7f941
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/modules/datasource/docker/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ describe('modules/datasource/docker/index', () => {
200,
{ tags },
{
link: '<https://api.github.com/user/9287/repos?page=3&per_page=100>; rel="next", ',
link: '<https://api.github.com/user/9287/repos?page=3&per_page=1000>; rel="next", ',
}
)
.get('/')
Expand All @@ -1031,7 +1031,7 @@ describe('modules/datasource/docker/index', () => {
.reply(200);
httpMock
.scope('https://api.github.com')
.get('/user/9287/repos?page=3&per_page=100')
.get('/user/9287/repos?page=3&per_page=1000')
.reply(200, { tags: ['latest'] }, {});
const config = {
datasource: DockerDatasource.id,
Expand Down Expand Up @@ -1526,7 +1526,7 @@ describe('modules/datasource/docker/index', () => {
const tags = ['1.0.0'];
httpMock
.scope(dockerHubUrl)
.get('/library/node/tags?page_size=100')
.get('/library/node/tags?page_size=1000')
.reply(404);
httpMock
.scope(baseUrl)
Expand Down Expand Up @@ -1558,12 +1558,12 @@ describe('modules/datasource/docker/index', () => {
process.env.RENOVATE_X_DOCKER_HUB_TAGS = 'true';
httpMock
.scope(dockerHubUrl)
.get('/library/node/tags?page_size=100')
.get('/library/node/tags?page_size=1000')
.reply(200, {
next: `${dockerHubUrl}/library/node/tags?page=2&page_size=100`,
next: `${dockerHubUrl}/library/node/tags?page=2&page_size=1000`,
results: [{ name: '1.0.0' }],
})
.get('/library/node/tags?page=2&page_size=100')
.get('/library/node/tags?page=2&page_size=1000')
.reply(200, {
results: [{ name: '0.9.0' }],
});
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/datasource/docker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ export class DockerDatasource extends Datasource {
let tags: string[] = [];
let url:
| string
| undefined = `https://hub.docker.com/v2/repositories/${dockerRepository}/tags?page_size=100`;
| undefined = `https://hub.docker.com/v2/repositories/${dockerRepository}/tags?page_size=1000`;
do {
const res: DockerHubTags = (await this.http.getJson<DockerHubTags>(url))
.body;
Expand Down

0 comments on commit 8f7f941

Please sign in to comment.