Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
JENKINS-33836 deletion of MR projects when merge_to triggering is dis…
…abled
  • Loading branch information
javiplx committed Mar 27, 2016
1 parent a0beeee commit 644b3363029980b2acb797181d2799790f355f71
Showing with 3 additions and 3 deletions.
  1. +1 −1 models/use_cases/process_merge_request.rb
  2. +2 −2 models/values/project.rb
@@ -19,7 +19,7 @@ def with(details, candidates)
return [ 'No merge-request project candidates'] unless candidates

candidates.select! do |project|
project.matches?(details, details.branch, true) && project.merge_to?(details.target_branch)
project.matches?(details, details.branch, true) && project.merge_to?(details.target_branch, true)
end

case details.state
@@ -77,8 +77,8 @@ def pre_build_merge?
pre_build_merge ? true : false
end

def merge_to?(branch)
return false unless settings.merged_branch_triggering? && pre_build_merge?
def merge_to?(branch, is_mr = false)
return false unless ( is_mr || settings.merged_branch_triggering? ) && pre_build_merge?
merge_params = pre_build_merge.get_options
merge_params.merge_target == branch
end

0 comments on commit 644b336

Please sign in to comment.