Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/commit_collection.rb')
-rw-r--r--app/models/commit_collection.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/commit_collection.rb b/app/models/commit_collection.rb
index edc60a757d2..993e1af20d5 100644
--- a/app/models/commit_collection.rb
+++ b/app/models/commit_collection.rb
@@ -24,8 +24,12 @@ class CommitCollection
commits.each(&block)
end
- def committers
- emails = without_merge_commits.filter_map(&:committer_email).uniq
+ def committers(with_merge_commits: false)
+ emails = if with_merge_commits
+ commits.filter_map(&:committer_email).uniq
+ else
+ without_merge_commits.filter_map(&:committer_email).uniq
+ end
User.by_any_email(emails)
end