Skip to content

Commit d27cffb

Browse files
committed
Don't show url if No commit
1 parent 85442aa commit d27cffb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/views/shipit/stacks/_banners.html.erb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@
7070
<p class="banner__text">
7171
Continuous Delivery for this stack is currently paused because
7272

73-
<%= link_to_if stack.deployment_checks_passed?, 'the pre-deploy checks failed', stack_commit_checks_path(stack, sha: stack.next_commit_to_deploy.sha) %>.
73+
<% next_commit = stack.next_commit_to_deploy %>
74+
<%= if stack.deployment_checks_passed? && next_commit
75+
link_to 'the pre-deploy checks failed', stack_commit_checks_path(stack, sha: next_commit.sha)
76+
else
77+
'the pre-deploy checks failed'
78+
end %>.
7479
You can either wait for them to pass, or trigger a deploy manually.
7580
</p>
7681
</div>

0 commit comments

Comments
 (0)