summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-17 11:03:33 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-17 11:03:33 +0200
commit630e879066156e8593a8b42b531ef727227c60bf (patch)
tree287b45affe4feb4129a10f2dbf379c3ce9c77fbf /app/models/commit.rb
parent990b476faae2720321d9ad604fab52efc25bf82f (diff)
downloadgitlab-ce-630e879066156e8593a8b42b531ef727227c60bf.tar.gz
Clean up code somewhat.better-commit-mentions
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 6677dcb1e34..1cabc060c2a 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -139,15 +139,14 @@ class Commit
users << author
users << committer
- mentions = []
- mentions << self.mentioned_users(current_user, project)
+ users.push *self.mentioned_users(current_user, project)
notes(project).each do |note|
users << note.author
- mentions << note.mentioned_users(current_user, project)
+ users.push *note.mentioned_users(current_user, project)
end
- users.concat(mentions.reduce([], :|)).uniq
+ users.uniq
end
def notes(project)