Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2018-09-27 18:35:15 +0300
committerJacopo <beschi.jacopo@gmail.com>2018-10-03 19:11:42 +0300
commitf3834e9c2d00b20bb7c55cb8845a98f0d8c86443 (patch)
treeba406e260b38b2a2efa34f191104aa6ffef6b05e /lib
parentf4db21eb22eeb9e07a9f5850d496570992f6d1f9 (diff)
Includes commit stats in POST project commits API
Diffstat (limited to 'lib')
-rw-r--r--lib/api/commits.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index ff927d1aa3c..e59abd3e3d0 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -98,6 +98,7 @@ module API
optional :start_branch, type: String, desc: 'Name of the branch to start the new commit from'
optional :author_email, type: String, desc: 'Author email for commit'
optional :author_name, type: String, desc: 'Author name for commit'
+ optional :stats, type: Boolean, default: true, desc: 'Include commit stats'
end
post ':id/repository/commits' do
authorize_push_to_branch!(params[:branch])
@@ -113,7 +114,7 @@ module API
Gitlab::WebIdeCommitsCounter.increment if find_user_from_warden
- present commit_detail, with: Entities::CommitDetail
+ present commit_detail, with: Entities::CommitDetail, stats: params[:stats]
else
render_api_error!(result[:message], 400)
end