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/merge_request.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/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 9c9e2762507..e242cae8ea1 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -242,7 +242,7 @@ class MergeRequest < ActiveRecord::Base } unless last_commit.nil? - attrs.merge!(last_commit: last_commit.hook_attrs(source_project)) + attrs.merge!(last_commit: last_commit.hook_attrs) end attributes.merge!(attrs) @@ -259,7 +259,7 @@ class MergeRequest < ActiveRecord::Base # Return the set of issues that will be closed if this merge request is accepted. def closes_issues(current_user = self.author) if target_branch == project.default_branch - issues = commits.flat_map { |c| c.closes_issues(project, current_user) } + issues = commits.flat_map { |c| c.closes_issues(current_user) } issues.push(*Gitlab::ClosingIssueExtractor.new(project, current_user). closed_by_message(description)) issues.uniq.sort_by(&:id) |