Skip to content

Commit f1b6ace

Browse files
committed
hide build now on projects page if lastest task pending or running
1 parent ede3f23 commit f1b6ace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/projects/_project.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<%= render partial: 'projects/task_state', locals: { project: project } %>
2626
</div>
2727

28-
<% if project.sources_verified? %>
28+
<% if project.sources_verified? && %w[pending_fetch pending_build running].exclude?(project.tasks.order(:created_at).last&.state) %>
2929
<%= button_to 'Build now', tasks_path(project_id: project.id, no_redirect: 'true'), method: :post, class: 'btn btn-link btn-sm' %>
3030
<% end %>
3131
</div>

0 commit comments

Comments
 (0)