From 38d5f88a8183147cc5ecc6ece58fc28836a4af8b Mon Sep 17 00:00:00 2001 From: CirnoT <1447794+CirnoT@users.noreply.github.com> Date: Sat, 18 Apr 2020 08:53:56 +0200 Subject: [PATCH] Add X-Total-Count on /repos/{owner]/{repo}/pulls API (#11113) Co-authored-by: techknowlogick --- routers/api/v1/repo/pull.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 86df3920c8..b23d502c6f 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -113,6 +113,7 @@ func ListPullRequests(ctx *context.APIContext, form api.ListPullRequestsOptions) } ctx.SetLinkHeader(int(maxResults), listOptions.PageSize) + ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults)) ctx.JSON(http.StatusOK, &apiPrs) }