Skip to content
Snippets Groups Projects
Commit fab8bc53 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files
parent 55448528
No related branches found
No related tags found
1 merge request!5142Add a download buttons for Build Artifacts
Pipeline #
Loading
@@ -430,13 +430,13 @@ class Project < ActiveRecord::Base
Loading
@@ -430,13 +430,13 @@ class Project < ActiveRecord::Base
end end
   
def builds_for(build_name, ref = 'HEAD') def builds_for(build_name, ref = 'HEAD')
ct = commit(ref) commit_object = commit(ref)
   
if ct.nil? if commit_object.nil?
builds.none builds.none
else else
builds.joins(:pipeline). builds.joins(:pipeline).
merge(Ci::Pipeline.where(sha: ct.sha)). merge(Ci::Pipeline.where(sha: commit_object.sha)).
where(name: build_name) where(name: build_name)
end end
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment