diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2019-01-03 10:59:14 +0000 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2019-01-08 00:27:29 +0100 |
commit | a2842241d4f583625053aba4d2c37a2f15b21913 (patch) | |
tree | 088aeb8c89c56e20ea5f003e3556584b5b524232 /app/models/commit_collection.rb | |
parent | cfa7108210490704a8110ee97a26de9ae4d9adaf (diff) | |
download | gitlab-ce-a2842241d4f583625053aba4d2c37a2f15b21913.tar.gz |
Add committers and authors methods on MergeRequest
These are used by the EE-only approvers feature
Diffstat (limited to 'app/models/commit_collection.rb')
-rw-r--r-- | app/models/commit_collection.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/commit_collection.rb b/app/models/commit_collection.rb index e349f0fe971..885f61beb05 100644 --- a/app/models/commit_collection.rb +++ b/app/models/commit_collection.rb @@ -19,6 +19,12 @@ class CommitCollection commits.each(&block) end + def committers + emails = commits.reject(&:merge_commit?).map(&:committer_email).uniq + + User.by_any_email(emails) + end + # Sets the pipeline status for every commit. # # Setting this status ahead of time removes the need for running a query for |