We should actually give latest success builds as well

This commit is contained in:
Lin Jen-Shin 2016-07-18 21:17:16 +08:00
parent af86b8c2c2
commit e51d4a05b7

View file

@ -432,7 +432,7 @@ class Project < ActiveRecord::Base
def latest_success_builds_for(ref = 'HEAD')
Ci::Build.joins(:pipeline).
merge(pipelines.where(ref: ref).success.latest).
with_artifacts
with_artifacts.success.latest
end
def merge_base_commit(first_commit_id, second_commit_id)