diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2019-03-06 10:44:59 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-03-06 10:44:59 +0000 |
commit | de5aef3bbda9217e32fc91c24280f78869c9c9c1 (patch) | |
tree | 1c2a7468e0b7f31134ee7b6e9f537b798fdf724e /lib/api/commits.rb | |
parent | c9e5ce8dbd25203484b43c48f0a55a5d7bf396e8 (diff) | |
download | gitlab-ce-de5aef3bbda9217e32fc91c24280f78869c9c9c1.tar.gz |
Accept force option on commit via API
When `force` is set to `true` and `start_branch` is set, the
branch will be ovewritten with the new commit based on the
`HEAD` of the `start_branch`.
This commit includes changes to update the `gitaly-proto` gem.
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r-- | lib/api/commits.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index d0a9debda5b..65eb9bfb87e 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -99,6 +99,7 @@ module API 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' + optional :force, type: Boolean, default: false, desc: 'When `true` overwrites the target branch with a new commit based on the `start_branch`' end post ':id/repository/commits' do authorize_push_to_branch!(params[:branch]) |