Add API to get commits of PR #16300

Merged
sebastian-sauer merged 5 commits from feature/10918_commits_of_pr into main 2021-07-02 12:19:57 +00:00
sebastian-sauer commented 2021-06-29 19:31:35 +00:00 (Migrated from github.com)

fixes #10918

Co-authored-by: Andrew Bezold andrew.bezold@gmail.com

based on the changes in PR https://github.com/go-gitea/gitea/pull/12118

fixes #10918 Co-authored-by: Andrew Bezold <andrew.bezold@gmail.com> based on the changes in PR https://github.com/go-gitea/gitea/pull/12118
sebastian-sauer (Migrated from github.com) reviewed 2021-06-29 19:33:35 +00:00
sebastian-sauer (Migrated from github.com) commented 2021-06-29 19:33:35 +00:00

I think the old implementation had an issue as the end should be start + pageSize and not
start + Page
or did i miss anything here?

I think the old implementation had an issue as the end should be start + pageSize and not start + Page or did i miss anything here?
zeripath reviewed 2021-06-29 20:29:54 +00:00
Contributor

agh!

This needs to get into 1.15 and backport to 1.14 can you break this out to another PR?

agh! This needs to get into 1.15 and backport to 1.14 can you break this out to another PR?
sebastian-sauer (Migrated from github.com) reviewed 2021-06-29 20:34:49 +00:00
sebastian-sauer (Migrated from github.com) commented 2021-06-29 20:34:49 +00:00

sure.

sure.
sebastian-sauer (Migrated from github.com) reviewed 2021-06-29 20:37:11 +00:00
sebastian-sauer (Migrated from github.com) commented 2021-06-29 20:37:10 +00:00
https://github.com/go-gitea/gitea/pull/16303
6543 (Migrated from github.com) reviewed 2021-06-30 18:27:59 +00:00
6543 (Migrated from github.com) commented 2021-06-30 18:27:58 +00:00
	ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", totalNumberOfCommits))

-> https://github.com/go-gitea/gitea/issues/11114

```suggestion ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", totalNumberOfCommits)) ``` -> https://github.com/go-gitea/gitea/issues/11114
6543 (Migrated from github.com) approved these changes 2021-06-30 18:53:23 +00:00
a1012112796 (Migrated from github.com) reviewed 2021-07-02 08:43:07 +00:00
a1012112796 (Migrated from github.com) commented 2021-07-02 08:43:07 +00:00

These message is usefull for all list api, maybe it's better to add a help function named as ctx.SetResultHeader(...) to do it.

These message is usefull for all list api, maybe it's better to add a help function named as ``ctx.SetResultHeader(...)`` to do it.
a1012112796 (Migrated from github.com) approved these changes 2021-07-02 08:47:30 +00:00
a1012112796 (Migrated from github.com) left a comment

LGTM, and suggest move this pull request to v1.15

LGTM, and suggest move this pull request to v1.15
6543 (Migrated from github.com) reviewed 2021-07-02 11:19:27 +00:00
6543 (Migrated from github.com) commented 2021-07-02 11:19:27 +00:00

yes as #11114 proposed some general "SetListResultHeaders() or so

yes as #11114 proposed some general "SetListResultHeaders() or so
This repo is archived. You cannot comment on pull requests.
No Milestone
No project
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#16300
No description provided.