diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2019-07-14 20:19:13 +0200 |
---|---|---|
committer | Christian Couder <chriscool@tuxfamily.org> | 2019-07-17 13:32:41 +0200 |
commit | 8256d4075db4ee2d00897f21d34b78f092571f2c (patch) | |
tree | 0b409629901c06dd4e96f7cbf960d8fb0c1a1500 /lib/gitlab/push_options.rb | |
parent | 4f95a8d7f6612e8df138bd831db7f689a01ef9ca (diff) | |
download | gitlab-ce-8256d4075db4ee2d00897f21d34b78f092571f2c.tar.gz |
Support rm src branch on merge w/ push option
MergeRequests::PushOptionsHandlerService has been updated to allow
creating and updating merge requests with the
`remove_source_branch` set using git push options.
To create a new merge request and set it to remove the source branch
when it is merged:
git push -u origin -o merge_request.create \
-o merge_request.remove_source_branch
To update an existing merge request and set it to remove the source
branch when it is merged:
git push -u origin -o merge_request.remove_source_branch
Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/64320
Diffstat (limited to 'lib/gitlab/push_options.rb')
-rw-r--r-- | lib/gitlab/push_options.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/push_options.rb b/lib/gitlab/push_options.rb index 3137676ba4b..b96590af08e 100644 --- a/lib/gitlab/push_options.rb +++ b/lib/gitlab/push_options.rb @@ -4,7 +4,12 @@ module Gitlab class PushOptions VALID_OPTIONS = HashWithIndifferentAccess.new({ merge_request: { - keys: [:create, :merge_when_pipeline_succeeds, :target] + keys: [ + :create, + :merge_when_pipeline_succeeds, + :remove_source_branch, + :target + ] }, ci: { keys: [:skip] |