summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-12-14 21:00:06 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-12-14 23:37:49 +0800
commit7cced60069c248156decf6ceabc4d1f447e47ff7 (patch)
tree1c7c6f52745c3b2066094dcd6edec3fd99e91f62 /app/models/commit.rb
parent3ce6ba7db9bcdeb9a642e7020fb736ebe54f88aa (diff)
downloadgitlab-ce-7cced60069c248156decf6ceabc4d1f447e47ff7.tar.gz
Introduce latest_status and add a few tests
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7333#note_20003268
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 91c7970fca6..69cfc47f5bf 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -230,7 +230,7 @@ class Commit
return @statuses[ref] if @statuses.key?(ref)
- @statuses[ref] = pipelines.latest(ref).status
+ @statuses[ref] = pipelines.latest_status(ref)
end
def revert_branch_name
@@ -266,7 +266,7 @@ class Commit
@merged_merge_request_hash ||= Hash.new do |hash, user|
hash[user] = merged_merge_request_no_cache(user)
end
-
+
@merged_merge_request_hash[current_user]
end