We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
renovate/lib/platform/gitea/gitea-got-wrapper.ts
Lines 33 to 36 in 22f7607
when url.query.page is undefined , NaN || 1 + 1 is equivalent to NaN || 2, so nextPage starts from 3.
url.query.page
undefined
NaN || 1 + 1
NaN || 2
I have 26 repo, gitea default repo search page size is 10, so repo 21-26 got executed multiple times, and repo 11-20 will never got executed.
## Fix
let nextPage = parseInt(url.query.page || '1', 10)
then throw a error when nextPage is NaN.
nextPage
seems modify url.query won't affect URL.format result
url.query
URL.format
> u = URL.parse('https://git.example.com/api/v1/repos/search?uid=1', true) Url { protocol: 'https:', slashes: true, auth: null, host: 'git.example.com', port: null, hostname: 'git.example.com', hash: null, search: '?uid=1', query: [Object: null prototype] { uid: '1' }, pathname: '/api/v1/repos/search', path: '/api/v1/repos/search?uid=1', href: 'https://git.example.com/api/v1/repos/search?uid=1' } > u.query.page = '1' '1' > URL.format(u) 'https://git.example.com/api/v1/repos/search?uid=1'
I have 26 repo, gitea default repo search page size is 10, so repo 1-10 got executed 3 times, and repo 11-26 will never got executed.
The text was updated successfully, but these errors were encountered:
fix: gitea pagination
57150ea
fix renovatebot#5797
fix(gitea): pagination (#5798)
f00846e
Fixes #5797
fix(gitea): pagination (renovatebot#5798)
a87adb8
Fixes renovatebot#5797
Successfully merging a pull request may close this issue.
renovate/lib/platform/gitea/gitea-got-wrapper.ts
Lines 33 to 36 in 22f7607
when
url.query.page
isundefined
,NaN || 1 + 1
is equivalent toNaN || 2
, so nextPage starts from 3.I have 26 repo, gitea default repo search page size is 10, so repo 21-26 got executed multiple times, and repo 11-20 will never got executed.## Fixlet nextPage = parseInt(url.query.page || '1', 10)
then throw a error whennextPage
is NaN.seems modify
url.query
won't affectURL.format
resultI have 26 repo, gitea default repo search page size is 10, so repo 1-10 got executed 3 times, and repo 11-26 will never got executed.
The text was updated successfully, but these errors were encountered: