diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-01-30 04:53:47 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-01-30 04:53:47 +0300 |
commit | dbfedb5adb3651d3b700186b24a5b1b69d10a0dd (patch) | |
tree | c34420dc30ecfa6479595294d59fd623406bc550 /app/models/merge_request.rb | |
parent | 1f309b69df3f71d988d4d31b08a1b683099a46e5 (diff) |
Check MR state before submitting queries for discussion state
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index f6d4843abc3..d025062f562 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -618,12 +618,12 @@ class MergeRequest < ActiveRecord::Base can_be_merged? && !should_be_rebased? end - def mergeable_state?(skip_ci_check: false) + def mergeable_state?(skip_ci_check: false, skip_discussions_check: false) return false unless open? return false if work_in_progress? return false if broken? return false unless skip_ci_check || mergeable_ci_state? - return false unless mergeable_discussions_state? + return false unless skip_discussions_check || mergeable_discussions_state? true end |