diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-15 21:59:01 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-19 10:07:14 +0200 |
commit | abfceb1e565490bb75e9a4fba0571cb2390fa5d8 (patch) | |
tree | 050041d279e30ccf96c5f6f7b4ea600281d2486e /app/models | |
parent | 4a5c21728ee4e6c3ef8e1c410ee0f0c9a47634cc (diff) | |
download | gitlab-ce-abfceb1e565490bb75e9a4fba0571cb2390fa5d8.tar.gz |
Cleanup changes
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/merge_request.rb | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index b215f02e4b7..75f48fd4ba5 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -744,21 +744,10 @@ class MergeRequest < ActiveRecord::Base @pipeline ||= source_project.pipeline_for(source_branch, diff_head_sha) end - def all_commits_sha - merge_request_diffs.map(&:commits).flatten.map(&:sha).sort.uniq - end - - def latest_pipelines - @latest_pipelines ||= - if diff_head_sha && source_project - source_project.pipelines.order(id: :desc).where(sha: commits_sha, ref: source_branch) - end - end - def all_pipelines @all_pipelines ||= if diff_head_sha && source_project - source_project.pipelines.order(id: :desc).where(sha: all_commits_sha, ref: source_branch) + source_project.pipelines.order(id: :desc).where(sha: commits_sha, ref: source_branch) end end |