@@ -43750,7 +43750,7 @@ var import_lib = require_lib();
4375043750var import_lib$1 = require_lib$3();
4375143751const SKIP_CHANGELOG_REG = /\[x\] 本条 PR 不需要纳入 Changelog/i;
4375243752const CHANGELOG_REG = /-\s([A-Z]+)(?:\(([A-Z\s_-]*)\))?\s*:\s*(.+)/i;
43753- function addContributor(body, contributor) {
43753+ function addContributor(body, contributor, link ) {
4375443754 if (SKIP_CHANGELOG_REG.test(body)) {
4375543755 (0, import_core$6.info)(`不需要纳入 Changelog`);
4375643756 return body;
@@ -43767,7 +43767,11 @@ function addContributor(body, contributor) {
4376743767 isSkip = true;
4376843768 return item;
4376943769 }
43770- if (CHANGELOG_REG.test(item)) return `${item} @${contributor}`;
43770+ if (CHANGELOG_REG.test(item)) {
43771+ let logContent = `${item} @${contributor}`;
43772+ if (link) logContent += ` ${link}`;
43773+ return logContent;
43774+ }
4377143775 }
4377243776 if (item === "### 📝 更新日志") isSkip = false;
4377343777 return item;
@@ -43930,6 +43934,9 @@ var GitHelper = class {
4393043934 const { stdout } = await (0, import_exec$3.getExecOutput)("git", ["status"], { cwd: this.repoPath });
4393143935 return !stdout.includes("nothing to commit, working tree clean");
4393243936 }
43937+ async printDiff() {
43938+ await (0, import_exec$3.exec)("git", ["diff"], { cwd: this.repoPath });
43939+ }
4393343940};
4393443941
4393543942//#endregion
@@ -44028,7 +44035,8 @@ async function start(context$1) {
4402844035 githubHelper.addComment(context$1.pr_number, "PR 还没合并,无法触发");
4402944036 return;
4403044037 }
44031- const body = addContributor(prData.body || "", prData.user.login);
44038+ const link = `([common#${context$1.pr_number}](https://github.com/Tencent/tdesign-common/pull/${context$1.pr_number}))`;
44039+ const body = addContributor(prData.body || "", prData.user.login, link);
4403244040 const trigger = context$1.trigger;
4403344041 const gitHelper = new GitHelper({
4403444042 repo: repoMap[trigger],
@@ -44055,7 +44063,10 @@ async function start(context$1) {
4405544063 "--NAME",
4405644064 "all"
4405744065 ], { cwd: `./${repoMap[trigger]}` });
44058- if (await gitHelper.isNeedCommit()) await gitHelper.commit("docs: update css vars");
44066+ if (await gitHelper.isNeedCommit()) {
44067+ await gitHelper.printDiff();
44068+ await gitHelper.commit("docs: update css vars");
44069+ }
4405944070 }
4406044071 await gitHelper.push(branchName);
4406144072 const newPrData = await new GithubHelper({
0 commit comments