Skip to content

Commit

Permalink
Add X-Total-Count on /repos/{owner]/{repo}/pulls API (go-gitea#11113)
Browse files Browse the repository at this point in the history
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
  • Loading branch information
2 people authored and Yohann Delafollye committed Jul 31, 2020
1 parent 1a40a5a commit 74c3ce2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions routers/api/v1/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 74c3ce2

Please sign in to comment.