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
Loading
@@ -430,13 +430,13 @@ class Project < ActiveRecord::Base
end
 
def builds_for(build_name, ref = 'HEAD')
ct = commit(ref)
commit_object = commit(ref)
 
if ct.nil?
if commit_object.nil?
builds.none
else
builds.joins(:pipeline).
merge(Ci::Pipeline.where(sha: ct.sha)).
merge(Ci::Pipeline.where(sha: commit_object.sha)).
where(name: build_name)
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment