diff --git a/templates/commit.hbs b/templates/commit.hbs index 803e2c7..9eb8a04 100644 --- a/templates/commit.hbs +++ b/templates/commit.hbs @@ -5,16 +5,20 @@ {{~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}} @@ -22,26 +26,31 @@ {{~!-- 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}}/ diff --git a/templates/header.hbs b/templates/header.hbs index e0c2dca..313fd65 100644 --- a/templates/header.hbs +++ b/templates/header.hbs @@ -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}} diff --git a/test/test.js b/test/test.js index 9423594..c5ede27 100644 --- a/test/test.js +++ b/test/test.js @@ -155,7 +155,7 @@ describe('angular preset', function() { config: preset, pkg: { path: __dirname + '/fixtures/_unknown-host.json' - }, + } }) .on('error', function(err) { done(err);