summaryrefslogtreecommitdiff
path: root/lib/api/commits.rb
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2018-09-27 17:35:15 +0200
committerJacopo <beschi.jacopo@gmail.com>2018-10-03 18:11:42 +0200
commitf3834e9c2d00b20bb7c55cb8845a98f0d8c86443 (patch)
treeba406e260b38b2a2efa34f191104aa6ffef6b05e /lib/api/commits.rb
parentf4db21eb22eeb9e07a9f5850d496570992f6d1f9 (diff)
downloadgitlab-ce-f3834e9c2d00b20bb7c55cb8845a98f0d8c86443.tar.gz
Includes commit stats in POST project commits API51803-include-commits-stats-in-projects-api
Diffstat (limited to 'lib/api/commits.rb')
-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