|
|
|
@ -1275,6 +1275,14 @@ func GetPullRequestCommits(ctx *context.APIContext) {
|
|
|
|
|
// in: query
|
|
|
|
|
// description: page size of results
|
|
|
|
|
// type: integer
|
|
|
|
|
// - name: verification
|
|
|
|
|
// in: query
|
|
|
|
|
// description: include verification for every commit (disable for speedup, default 'true')
|
|
|
|
|
// type: boolean
|
|
|
|
|
// - name: files
|
|
|
|
|
// in: query
|
|
|
|
|
// description: include a list of affected files for every commit (disable for speedup, default 'true')
|
|
|
|
|
// type: boolean
|
|
|
|
|
// responses:
|
|
|
|
|
// "200":
|
|
|
|
|
// "$ref": "#/responses/CommitList"
|
|
|
|
@ -1328,9 +1336,17 @@ func GetPullRequestCommits(ctx *context.APIContext) {
|
|
|
|
|
end = totalNumberOfCommits
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
verification := ctx.FormString("verification") == "" || ctx.FormBool("verification")
|
|
|
|
|
files := ctx.FormString("files") == "" || ctx.FormBool("files")
|
|
|
|
|
|
|
|
|
|
apiCommits := make([]*api.Commit, 0, end-start)
|
|
|
|
|
for i := start; i < end; i++ {
|
|
|
|
|
apiCommit, err := convert.ToCommit(ctx, ctx.Repo.Repository, baseGitRepo, commits[i], userCache, convert.ToCommitOptions{Stat: true})
|
|
|
|
|
apiCommit, err := convert.ToCommit(ctx, ctx.Repo.Repository, baseGitRepo, commits[i], userCache,
|
|
|
|
|
convert.ToCommitOptions{
|
|
|
|
|
Stat: true,
|
|
|
|
|
Verification: verification,
|
|
|
|
|
Files: files,
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ctx.ServerError("toCommit", err)
|
|
|
|
|
return
|
|
|
|
|