diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-21 15:15:49 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-24 12:29:36 +0200 |
commit | 27af24c1c951385bccd298c98044d57ff22ccd1c (patch) | |
tree | 32ffe57d8e73e21df946da1fff6861d0eda5c77e /app/models/commit.rb | |
parent | 8ed7ac9d443563a62a6aa03a2ec72b9fcb0d2df1 (diff) | |
download | gitlab-ce-27af24c1c951385bccd298c98044d57ff22ccd1c.tar.gz |
No longer needed to pass project argument to commit methods.
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index d4e9ebacac6..1985793c600 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -103,7 +103,7 @@ class Commit description.present? end - def hook_attrs(project) + def hook_attrs path_with_namespace = project.path_with_namespace { @@ -120,7 +120,7 @@ class Commit # Discover issues should be closed when this commit is pushed to a project's # default branch. - def closes_issues(project, current_user = self.committer) + def closes_issues(current_user = self.committer) Gitlab::ClosingIssueExtractor.new(project, current_user).closed_by_message(safe_message) end @@ -137,22 +137,22 @@ class Commit User.find_for_commit(committer_email, committer_name) end - def participants(project, current_user = nil) + def participants(current_user = nil) users = [] users << author users << committer - users.push *self.mentioned_users(current_user, project) + users.push *self.mentioned_users(current_user) - notes(project).each do |note| + notes.each do |note| users << note.author - users.push *note.mentioned_users(current_user, project) + users.push *note.mentioned_users(current_user) end users.uniq end - def notes(project) + def notes project.notes.for_commit_id(self.id) end |