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

Add X-Total-Count on /repos/{owner]/{repo}/pulls API endpoint #11113

Merged
merged 2 commits into from
Apr 18, 2020

Conversation

CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Apr 17, 2020

This is required to allow Renovate Bot to fetch more than 10 PRs as seen here.

https://github.com/renovatebot/renovate/blob/f00846ee5d00ec72bed8806bb6d257262c2911e9/lib/platform/gitea/gitea-got-wrapper.ts#L32

The reason Renovate uses X-Total-Count for pagination is because this header is already present on repos list endpoint.

We should consider adding this header to all other endpoints that list, however for sake of quick fix I have made the change only to pulls endpoint for now.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 17, 2020
@techknowlogick techknowlogick added modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality labels Apr 17, 2020
@techknowlogick techknowlogick added this to the 1.12.0 milestone Apr 17, 2020
@6543
Copy link
Member

6543 commented Apr 17, 2020

created #11114 to take track of the progress

@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 Apr 17, 2020
@codecov-io
Copy link

Codecov Report

Merging #11113 into master will increase coverage by 0.06%.
The diff coverage is 31.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11113      +/-   ##
==========================================
+ Coverage   43.46%   43.53%   +0.06%     
==========================================
  Files         597      599       +2     
  Lines       84706    84825     +119     
==========================================
+ Hits        36821    36931     +110     
- Misses      43344    43348       +4     
- Partials     4541     4546       +5     
Impacted Files Coverage Δ
models/issue_comment.go 46.68% <ø> (ø)
models/migrate.go 0.00% <0.00%> (ø)
models/migrations/migrations.go 3.50% <ø> (ø)
models/migrations/v136.go 0.00% <0.00%> (ø)
models/migrations/v137.go 0.00% <0.00%> (ø)
models/repo_language_stats.go 66.37% <ø> (ø)
modules/analyze/code_langauge.go 81.25% <ø> (ø)
modules/auth/repo_form.go 43.69% <ø> (ø)
modules/auth/sso/basic.go 50.81% <0.00%> (+7.15%) ⬆️
modules/git/repo_language_stats.go 66.17% <ø> (ø)
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7eace60...4bad9dc. Read the comment docs.

@techknowlogick techknowlogick merged commit 38d5f88 into go-gitea:master Apr 18, 2020
@CirnoT CirnoT deleted the patch-4 branch April 21, 2020 15:31
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@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
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/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants