summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/merge_request.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index ea5057c2a78..dd4daf3711b 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -333,6 +333,16 @@ class MergeRequest < ActiveRecord::Base
update_column(:merge_jid, jid)
end
+ def merge_participants
+ participants = [author]
+
+ if merge_when_pipeline_succeeds? && !participants.include?(merge_user)
+ participants << merge_user
+ end
+
+ participants
+ end
+
def first_commit
merge_request_diff ? merge_request_diff.first_commit : compare_commits.first
end