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
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2019-07-14 21:19:13 +0300
committerChristian Couder <chriscool@tuxfamily.org>2019-07-17 14:32:41 +0300
commit8256d4075db4ee2d00897f21d34b78f092571f2c (patch)
tree0b409629901c06dd4e96f7cbf960d8fb0c1a1500 /lib/gitlab/push_options.rb
parent4f95a8d7f6612e8df138bd831db7f689a01ef9ca (diff)
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.rb7
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]