summaryrefslogtreecommitdiff
path: root/lib/api/commits.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-13 21:08:59 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-13 21:08:59 +0000
commitd466ee5042520ad078fe050cb078d81dc2ebe196 (patch)
tree5648eb1aee8aeff5b5c5ff4669a184fd7676f778 /lib/api/commits.rb
parent6a9d7c009e4e5975a89bcc3e458da4b3ec484bd1 (diff)
downloadgitlab-ce-d466ee5042520ad078fe050cb078d81dc2ebe196.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r--lib/api/commits.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index 9dcf9b015aa..4e04a99e97c 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -38,6 +38,7 @@ module API
optional :all, type: Boolean, desc: 'Every commit will be returned'
optional :with_stats, type: Boolean, desc: 'Stats about each commit will be added to the response'
optional :first_parent, type: Boolean, desc: 'Only include the first parent of merges'
+ optional :order, type: String, desc: 'List commits in order', values: %w[topo]
use :pagination
end
get ':id/repository/commits' do
@@ -49,6 +50,7 @@ module API
all = params[:all]
with_stats = params[:with_stats]
first_parent = params[:first_parent]
+ order = params[:order]
commits = user_project.repository.commits(ref,
path: path,
@@ -57,7 +59,8 @@ module API
before: before,
after: after,
all: all,
- first_parent: first_parent)
+ first_parent: first_parent,
+ order: order)
commit_count =
if all || path || before || after || first_parent