summaryrefslogtreecommitdiff
path: root/lib/api/commits.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r--lib/api/commits.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index f0db1318146..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])
@@ -110,7 +111,10 @@ module API
if result[:status] == :success
commit_detail = user_project.repository.commit(result[:result])
- present commit_detail, with: Entities::CommitDetail
+
+ Gitlab::WebIdeCommitsCounter.increment if find_user_from_warden
+
+ present commit_detail, with: Entities::CommitDetail, stats: params[:stats]
else
render_api_error!(result[:message], 400)
end