Skip to content
New issue

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

Honor DEFAULT_PAGING_NUM for API #11805

Merged
merged 5 commits into from
Jun 9, 2020
Merged

Conversation

CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Jun 8, 2020

For some reason it was hardcoded to 10

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jun 8, 2020
@zeripath zeripath added modifies/api This PR adds API routes or modifies them type/bug labels Jun 8, 2020
@zeripath zeripath added this to the 1.13.0 milestone Jun 8, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 8, 2020
Copy link
Member

@techknowlogick techknowlogick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some tests are now failing though

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 8, 2020

Should we get rid of tests like RepositoriesDefaultMax10 or make them dynamic somehow? The option is configurable so we would need to read app.ini first or force some default during test phase?

@techknowlogick
Copy link
Member

Yeah, or instead of getting rid of them have it test the settings variable.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 8, 2020

Testing the setting variable won't work because it might be larger than amount of repos during test in which case we'll pass regardless whether the default works or is too big to get into effect.

@techknowlogick
Copy link
Member

ping LG-TM

@techknowlogick techknowlogick merged commit cefbf73 into go-gitea:master Jun 9, 2020
@techknowlogick
Copy link
Member

@CirnoT please send backport :)

@CirnoT CirnoT deleted the api-limit branch June 9, 2020 07:24
CirnoT added a commit to CirnoT/gitea that referenced this pull request Jun 9, 2020
* Honor DEFAULT_PAGING_NUM for API

* set pagination to 10 for tests

* lint

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
(cherry picked from commit cefbf73)
@lafriks lafriks added the backport/done All backports for this PR have been created label Jun 9, 2020
lafriks pushed a commit that referenced this pull request Jun 9, 2020
* Honor DEFAULT_PAGING_NUM for API

* set pagination to 10 for tests

* lint

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
(cherry picked from commit cefbf73)
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Honor DEFAULT_PAGING_NUM for API

* set pagination to 10 for tests

* lint

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants