From 15a77eec13c8b53f262c7a14091ed90a6b397ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E5=8D=9A?= Date: Fri, 25 Feb 2022 14:08:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=AE=98=E7=BD=91=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97=E7=9A=84?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E9=93=BE=E6=8E=A5=E5=8F=8A=20issue=20?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#10329)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: cklwblove --- .../vant-cli/template/changelog-commit.hbs | 28 +++++++++++++++++-- .../vant-cli/template/changelog-header.hbs | 14 +++++++++- 2 files changed, 39 insertions(+), 3 deletions(-) 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}}`