BigW Consortium Gitlab

Commit ef833a22 by Lin Jen-Shin

Give latest succeeded one, don't give pending/running ones

parent b14d40f0
......@@ -61,7 +61,9 @@ class Projects::ArtifactsController < Projects::ApplicationController
def build_from_ref
if params[:ref]
project.builds_for(params[:build_name], params[:ref]).latest.first
builds = project.builds_for(params[:build_name], params[:ref])
builds.latest.success.first
end
end
......
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