From 67bbfa5bd653e6ec34eb590886aae684166ed83f Mon Sep 17 00:00:00 2001 From: CirnoT <1447794+CirnoT@users.noreply.github.com> Date: Fri, 17 Apr 2020 22:19:53 +0200 Subject: [PATCH] Add X-Total-Count on /repos/{owner]/{repo}/pulls API --- 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 86df3920c876b..b23d502c6f6c5 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) }