diff --git a/packages/vant-cli/template/changelog-commit.hbs b/packages/vant-cli/template/changelog-commit.hbs index a05524abc..4b567e537 100644 --- a/packages/vant-cli/template/changelog-commit.hbs +++ b/packages/vant-cli/template/changelog-commit.hbs @@ -5,7 +5,31 @@ {{~header}} {{~/if}} {{#if references~}} - {{~#each references}} [{{~this.repository}}#{{this.issue}}]({{~@root.repoUrl}}/{{~@root.issue}}/{{this.issue}}){{/each}} -{{~else}} [{{shortHash}}]({{~@root.repoUrl}}/{{~@root.commit}}/{{hash}}) + {{~#each references}} [{{~this.repository}}#{{this.issue}}]( + {{~#if @root.repository}} + {{~#if @root.host}} + {{~@root.host}}/ + {{~/if}} + {{~#if @root.owner}} + {{~@root.owner}}/ + {{~/if}} + {{~@root.repository}} + {{~else}} + {{~@root.repoUrl}} + {{~/if}} + /{{~@root.issue}}/{{this.issue}}){{/each}} +{{~else}} [{{shortHash}}]( +{{~#if @root.repository}} + {{~#if @root.host}} + {{~@root.host}}/ + {{~/if}} + {{~#if @root.owner}} + {{~@root.owner}}/ + {{~/if}} + {{~@root.repository}} +{{~else}} + {{~@root.repoUrl}} +{{~/if}} +/{{~@root.commit}}/{{hash}}) {{~/if}} diff --git a/packages/vant-cli/template/changelog-header.hbs b/packages/vant-cli/template/changelog-header.hbs index bd0a517f9..aa5de66c0 100644 --- a/packages/vant-cli/template/changelog-header.hbs +++ b/packages/vant-cli/template/changelog-header.hbs @@ -1,3 +1,15 @@ -### [v{{version}}]({{~@root.repoUrl}}/compare/{{previousTag}}...{{currentTag}}) +### [v{{version}}]( +{{~#if @root.repository}} + {{~#if @root.host}} + {{~@root.host}}/ + {{~/if}} + {{~#if @root.owner}} + {{~@root.owner}}/ + {{~/if}} + {{~@root.repository}} +{{~else}} + {{~@root.repoUrl}} +{{~/if}} +/compare/{{previousTag}}...{{currentTag}}) `{{date}}`