/repos/${username}/${repo}/branches to return x-pagecount #14876

Open
opened 2025-11-02 11:24:56 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @ile on GitHub (Aug 19, 2025).

Feature Description

The API endpoint /repos/${username}/${repo}/commits returns these in the headers:

X-HasMore	
boolean
True if there is another page

X-Page	
integer <int64>
The current page

X-PageCount	
integer <int64>
Total number of pages

X-PerPage	
integer <int64>
Commits per page

X-Total	
integer <int64>
Total commit count

But /repos/${username}/${repo}/branches seems to return only x-total-count (total number of branches).

It would be helpful to return at least x-pagecount because it will vary according to the limit.

Screenshots

No response

Originally created by @ile on GitHub (Aug 19, 2025). ### Feature Description The API endpoint [`/repos/${username}/${repo}/commits`](https://docs.gitea.com/api/1.24/#tag/repository/operation/repoGetAllCommits) returns these in the headers: ``` X-HasMore boolean True if there is another page X-Page integer <int64> The current page X-PageCount integer <int64> Total number of pages X-PerPage integer <int64> Commits per page X-Total integer <int64> Total commit count ``` But [`/repos/${username}/${repo}/branches`](https://docs.gitea.com/api/1.24/#tag/repository/operation/repoListBranches) seems to return only `x-total-count` (total number of branches). It would be helpful to return at least `x-pagecount` because it will vary according to the `limit`. ### Screenshots _No response_
GiteaMirror added the topic/apitype/proposal labels 2025-11-02 11:24:56 -06:00
Author
Owner

@ile commented on GitHub (Aug 19, 2025):

It's possible to calculate them on your own, but for consistency it would be nice to have them.

@ile commented on GitHub (Aug 19, 2025): It's possible to calculate them on your own, but for consistency it would be nice to have them.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14876