summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2019-02-15 17:17:27 +0000
committerDouwe Maan <douwe@gitlab.com>2019-02-15 17:17:27 +0000
commit8f209ed5eac176fde0272ced69e36467e37fe79a (patch)
tree04df23046c266bda90daa560ce22334e6789b615 /app
parentfffce276f128ecf4267886c4706ad5e81d33d61d (diff)
parent886f00bcba23d67e2c86591c2eb5359ef457a2f9 (diff)
downloadgitlab-ce-8f209ed5eac176fde0272ced69e36467e37fe79a.tar.gz
Merge branch 'sh-fix-issue-9787-ce' into 'master'
Backport commit author changes from CE See merge request gitlab-org/gitlab-ce!25294
Diffstat (limited to 'app')
-rw-r--r--app/models/commit_collection.rb4
-rw-r--r--app/models/merge_request.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/app/models/commit_collection.rb b/app/models/commit_collection.rb
index 42ec5b5e664..a9a2e9c81eb 100644
--- a/app/models/commit_collection.rb
+++ b/app/models/commit_collection.rb
@@ -20,8 +20,8 @@ class CommitCollection
commits.each(&block)
end
- def committers
- emails = without_merge_commits.map(&:committer_email).uniq
+ def authors
+ emails = without_merge_commits.map(&:author_email).uniq
User.by_any_email(emails)
end
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 790555ab045..75fca96ce0a 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -286,12 +286,12 @@ class MergeRequest < ActiveRecord::Base
work_in_progress?(title) ? title : "WIP: #{title}"
end
- def committers
- @committers ||= commits.committers
+ def commit_authors
+ @commit_authors ||= commits.authors
end
def authors
- User.from_union([committers, User.where(id: self.author_id)])
+ User.from_union([commit_authors, User.where(id: self.author_id)])
end
# Verifies if title has changed not taking into account WIP prefix