fix commit link in build header
This commit is contained in:
parent
e86de3d068
commit
d78ec1a438
|
@ -2,6 +2,7 @@
|
||||||
`import { gravatarImage } from 'travis/utils/urls'`
|
`import { gravatarImage } from 'travis/utils/urls'`
|
||||||
`import GithubUrlPropertievs from 'travis/mixins/github-url-properties'`
|
`import GithubUrlPropertievs from 'travis/mixins/github-url-properties'`
|
||||||
`import { durationFrom, safe } from 'travis/utils/helpers'`
|
`import { durationFrom, safe } from 'travis/utils/helpers'`
|
||||||
|
`import { githubCommit } from 'travis/utils/urls'`
|
||||||
|
|
||||||
BuildHeaderComponent = Ember.Component.extend
|
BuildHeaderComponent = Ember.Component.extend
|
||||||
|
|
||||||
|
@ -21,6 +22,10 @@ BuildHeaderComponent = Ember.Component.extend
|
||||||
if @get('item.build') then true else false
|
if @get('item.build') then true else false
|
||||||
).property('item')
|
).property('item')
|
||||||
|
|
||||||
|
urlGithubCommit: (->
|
||||||
|
githubCommit(@get('repo.slug'), @get('commit.sha'))
|
||||||
|
).property('item')
|
||||||
|
|
||||||
elapsedTime: (->
|
elapsedTime: (->
|
||||||
durationFrom(@get('item.startedAt'), @get('item.finishedAt'))
|
durationFrom(@get('item.startedAt'), @get('item.finishedAt'))
|
||||||
).property('item.startedAt', 'item.finishedAt', 'item.duration')
|
).property('item.startedAt', 'item.finishedAt', 'item.duration')
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{loading-indicator}}
|
{{loading-indicator}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
||||||
{{build-header item=build user=auth.currentUser commit=commit}}
|
{{build-header item=build user=auth.currentUser commit=commit repo=repo}}
|
||||||
|
|
||||||
{{#unless build.isMatrix}}
|
{{#unless build.isMatrix}}
|
||||||
{{view 'annotations' annotations=build.jobs.firstObject.annotations}}
|
{{view 'annotations' annotations=build.jobs.firstObject.annotations}}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</p>
|
</p>
|
||||||
<ul class="list-icon">
|
<ul class="list-icon">
|
||||||
<li>
|
<li>
|
||||||
<a class="commit-commit" href={{urlGithubCommit}}>
|
<a class="commit-commit" title="See the commit on GitHub" href={{urlGithubCommit}}>
|
||||||
Commit {{format-sha commit.sha}}</a>
|
Commit {{format-sha commit.sha}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{#if job.isLoaded}}
|
{{#if job.isLoaded}}
|
||||||
|
|
||||||
{{build-header item=job user=auth.currentUser commit=job.commit}}
|
{{build-header item=job user=auth.currentUser commit=job.commit repo=repo}}
|
||||||
|
|
||||||
{{view 'annotations' annotations=view.annotations}}
|
{{view 'annotations' annotations=view.annotations}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user