Skip to content
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.

Commit

Permalink
feat(template): use context.repoUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemao committed May 10, 2016
1 parent ed32559 commit 2b5818b
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 31 deletions.
55 changes: 32 additions & 23 deletions templates/commit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,52 @@
{{~header}}
{{~/if}}

{{~!-- commit link --}}
{{~#if @root.linkReferences~}}
{{~!-- commit link --}} {{#if @root.linkReferences~}}
([{{hash}}](
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}/{{@root.commit}}/{{hash}}))
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.commit}}/{{hash}}))
{{~else}}
{{~hash}}
{{~/if}}

{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}} {{#if @root.linkReferences}}[
{{~#each references}} {{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~this.repository}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~/if}}
{{~else}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~/if~}}
/{{@root.issue}}/{{this.issue}})
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.issue}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
Expand Down
19 changes: 12 additions & 7 deletions templates/header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
#
{{~/if}} {{#if @root.linkCompare~}}
[{{version}}](
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}/compare/{{previousTag}}...{{currentTag}})
{{~#if @root.repository~}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if~}}
/compare/{{previousTag}}...{{currentTag}})
{{~else}}
{{~version}}
{{~/if}}
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('angular preset', function() {
config: preset,
pkg: {
path: __dirname + '/fixtures/_unknown-host.json'
},
}
})
.on('error', function(err) {
done(err);
Expand Down

0 comments on commit 2b5818b

Please sign in to comment.