BigW Consortium Gitlab

Commit dcb436f5 by Lin Jen-Shin

Use Project#latest_success_builds_for

parent 3be2c3f5
......@@ -27,7 +27,7 @@
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: branch.name), class: 'btn btn-default', method: :post, title: "Compare" do
Compare
- artifacts = @project.builds_for(@repository.root_ref).latest.with_artifacts
- artifacts = @project.latest_success_builds_for(@repository.root_ref)
- if artifacts.any?
.dropdown.inline.artifacts-btn
%a.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' }
......
......@@ -14,7 +14,7 @@
%li
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: @ref, format: 'tar.gz'), rel: 'nofollow' do
%span Download tar.gz
- artifacts = @project.builds_for(@ref).latest.with_artifacts
- artifacts = @project.latest_success_builds_for(@ref)
- if artifacts.any?
%li.dropdown-header Artifacts
- artifacts.each do |job|
......
......@@ -12,7 +12,7 @@
%li
= link_to archive_namespace_project_repository_path(project.namespace, project, ref: ref, format: 'tar.gz'), rel: 'nofollow' do
%span Download tar.gz
- artifacts = project.builds_for(ref).latest.with_artifacts
- artifacts = project.latest_success_builds_for(ref)
- if artifacts.any?
%li.dropdown-header Artifacts
- artifacts.each do |job|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment