diff options
author | Dongqing Hu <sorra@outlook.com> | 2017-01-31 22:42:54 +0800 |
---|---|---|
committer | Dongqing Hu <sorra@outlook.com> | 2017-01-31 22:42:54 +0800 |
commit | bbbef273f74a59a18cf534e147e79e90888d7656 (patch) | |
tree | 1e82324ff59b504708909cb3950239a2663ab9fa /app/models/merge_request.rb | |
parent | 821ab7cf7dc45932167986005013044e346c8823 (diff) | |
download | gitlab-ce-bbbef273f74a59a18cf534e147e79e90888d7656.tar.gz |
Remove MergeRequest#closes_issue?; Remove the default parameter value for #cache_merge_request_closes_issues! and #issues_mentioned_but_not_closing
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 881a49d4ac2..9e5e5a3b70a 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -541,7 +541,7 @@ class MergeRequest < ActiveRecord::Base # Calculating this information for a number of merge requests requires # running `ReferenceExtractor` on each of them separately. # This optimization does not apply to issues from external sources. - def cache_merge_request_closes_issues!(current_user = self.author) + def cache_merge_request_closes_issues!(current_user) return if project.has_external_issue_tracker? transaction do @@ -553,10 +553,6 @@ class MergeRequest < ActiveRecord::Base end end - def closes_issue?(issue) - closes_issues.include?(issue) - end - # 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 @@ -570,7 +566,7 @@ class MergeRequest < ActiveRecord::Base end end - def issues_mentioned_but_not_closing(current_user = self.author) + def issues_mentioned_but_not_closing(current_user) return [] unless target_branch == project.default_branch ext = Gitlab::ReferenceExtractor.new(project, current_user) |