diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-11-23 20:00:58 +0800 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-11-23 20:02:14 +0800 |
commit | f2a0c6f6bf768db8837283ad65fe6790b9105d26 (patch) | |
tree | 069462cbabd3e24e4fbd15bbfa65865a5c19c21f /app | |
parent | d0c0c75ca9568bc3ec00c341a6053623d85e6201 (diff) | |
download | gitlab-ce-f2a0c6f6bf768db8837283ad65fe6790b9105d26.tar.gz |
Correctly determine mergeability of MR with no discussions24863-mrs-without-discussions-are-mergeable
Diffstat (limited to 'app')
-rw-r--r-- | app/models/merge_request.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 6c3c093d084..fdf54cc8a7e 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -494,10 +494,14 @@ class MergeRequest < ActiveRecord::Base discussions_resolvable? && diff_discussions.none?(&:to_be_resolved?) end + def discussions_to_be_resolved? + discussions_resolvable? && !discussions_resolved? + end + def mergeable_discussions_state? return true unless project.only_allow_merge_if_all_discussions_are_resolved? - discussions_resolved? + !discussions_to_be_resolved? end def hook_attrs |