diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-21 22:19:16 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-21 22:19:16 +0800 |
commit | 721f2d3788ae5e8374f357014bd9e20d62de0a81 (patch) | |
tree | 44c2f09930d5212e260d7b7fe1fc3ee023b37f65 /app/models/commit.rb | |
parent | b20c7846ffc0c78d6b483184363b6ccc7c11326d (diff) | |
download | gitlab-ce-721f2d3788ae5e8374f357014bd9e20d62de0a81.tar.gz |
Still use compound pipeline status, but group by
ref and sha so that it would show latest pipeline
if ref and sha are both specified, otherwise still
the same as before.
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 2134ba2d75f..b588b93b158 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -234,13 +234,7 @@ class Commit return @statuses[ref] if @statuses.key?(ref) - latest_pipeline = if ref - pipelines.latest_for(ref) - else - pipelines.latest - end.first - - @statuses[ref] = latest_pipeline.try(:status) + @statuses[ref] = pipelines.latest_for(ref).status end def revert_branch_name |