
It seems that when repo object on job is not instantiated it can error out when trying to use slug along with slug. Before I dig deeper into this, the easy fix is to pass repo from the top, because on repo view it's loaded already.
93 lines
3.5 KiB
Handlebars
93 lines
3.5 KiB
Handlebars
{{#if loading}}
|
|
<span class="sync-spinner sync-spinner--grey"><i></i><i></i><i></i></span>
|
|
{{else}}
|
|
<section {{bind-attr class=":tile :tile--pass :row build.state"}}>
|
|
<div class="tile-status">
|
|
<span {{bind-attr class=":icon :icon-status build.state"}}></span>
|
|
<span {{bind-attr class=":request-kind build.eventType :icon"}}></span>
|
|
</div>
|
|
|
|
<div class="tile-main medium-8 columns">
|
|
<h2 class="repo-main-commit">
|
|
{{#if build.pullRequest}}
|
|
<small class="repo-main-branch" {{bind-attr title="build.pullRequestTitle"}}>Pull Request #{{build.pullRequestNumber}}</small>
|
|
{{build.pullRequestTitle}}
|
|
{{else}}
|
|
<small class="repo-main-branch" {{bind-attr title="build.commit.branch"}}>{{build.commit.branch}}</small>
|
|
{{format-message build.commit.subject repo=build.repo}}
|
|
{{/if}}
|
|
</h2>
|
|
<div class="repo-main-description">
|
|
{{#if build.pullRequest}}
|
|
<p>{{format-message build.commit.subject repo=build.repo}}</p>
|
|
{{/if}}
|
|
<pre class="body">{{format-message build.commit.body repo=build.repo pre=true}}</pre>
|
|
</div>
|
|
<div class="tile-author">
|
|
{{#if commit.authorName}}
|
|
<img {{bind-attr src="urlAuthorGravatarImage"}}>{{commit.authorName}} authored{{#if commit.authorIsCommitter}} and committed{{/if}}
|
|
{{/if}}
|
|
{{#unless commit.authorIsCommitter}}
|
|
{{#if commit.committerName}}
|
|
<img {{bind-attr src="urlCommitterGravatarImage"}}>{{commit.committerName}} committed
|
|
{{/if}}
|
|
{{/unless}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tile-additional medium-4 columns end">
|
|
<ul class="repo-main-info">
|
|
<li class="repo-build-status">{{#link-to "build" repo build}}
|
|
<span class="icon icon--hash"></span>
|
|
{{build.number}} {{humanize-state build.state}}{{/link-to}}
|
|
</li>
|
|
<li>
|
|
<a class="commit" {{bind-attr href="urlGithubCommit"}}>
|
|
<span class="icon icon--github"></span>
|
|
Commit {{format-sha commit.sha}}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
{{#if build.pullRequest}}
|
|
<a class="compare" {{bind-attr href="build.commit.compareUrl"}}><span class="icon icon--github"></span> #{{build.pullRequestNumber}}: {{build.pullRequestTitle}}</a>
|
|
{{else}}
|
|
{{#if build.commit.compareUrl}}
|
|
<a class="compare" {{bind-attr href="build.commit.compareUrl"}}>
|
|
<span class="icon icon--github"></span>
|
|
Compare {{short-compare-shas build.commit.compareUrl}}</a>
|
|
{{/if}}
|
|
{{/if}}
|
|
</li>
|
|
<li>
|
|
<span class="icon icon--clock"></span>
|
|
{{#if build.isFinished}}ran{{else}}running{{/if}} for {{format-duration build.duration}}
|
|
</li>
|
|
<li {{bind-attr title="build.finishedAt"}}>
|
|
<span class="icon icon--cal"></span>
|
|
{{format-time build.finishedAt}}
|
|
</li>
|
|
</ul>
|
|
|
|
{{repo-actions build=build repo=build.repo user=auth.currentUser}}
|
|
</div>
|
|
</section>
|
|
|
|
{{#unless build.isMatrix}}
|
|
{{view 'annotations' annotations=build.jobs.firstObject.annotations}}
|
|
{{/unless}}
|
|
|
|
{{#if build.isMatrix}}
|
|
{{#if jobsLoaded}}
|
|
{{jobs-list jobs=build.requiredJobs repo=repo required="true"}}
|
|
{{jobs-list jobs=build.allowedFailureJobs repo=repo}}
|
|
{{else}}
|
|
<div class="spinner-container">
|
|
<span class="sync-spinner sync-spinner--grey"><i></i><i></i><i></i></span>
|
|
</div>
|
|
{{/if}}
|
|
{{else}}
|
|
{{view 'log' job=build.jobs.firstObject}}
|
|
{{/if}}
|
|
|
|
{{/if}}
|