From 4c3acbb787320c0d2f5c8832072c1de4da9c3a9a Mon Sep 17 00:00:00 2001 From: zhaoyingbo Date: Wed, 14 Aug 2024 01:37:43 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=91=98=E8=A6=81=E8=A1=A8=E6=A0=BC=E4=B8=AD=E7=9A=84=E5=88=86?= =?UTF-8?q?=E9=9A=94=E7=AC=A6=E8=BD=AC=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/manageMrEvent/utils/commenter.ts | 5 ++++- package.json | 2 +- test/manageMrEvent.test.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/controllers/manageMrEvent/utils/commenter.ts b/controllers/manageMrEvent/utils/commenter.ts index cfcec64..b3e916e 100644 --- a/controllers/manageMrEvent/utils/commenter.ts +++ b/controllers/manageMrEvent/utils/commenter.ts @@ -156,7 +156,10 @@ ${summarizedMr} | 文件路径 | 变更摘要 | | --- | --- | ${[...summarizedFileMap] - .map(([path, summary]) => `| \`${shortenPath(path)}\` | ${summary} |`) + .map( + ([path, summary]) => + `| \`${shortenPath(path)}\` | ${summary.replaceAll("|", "\\|")} |` + ) .join("\n")} ` this.logger.debug(`Summarized comment: ${summarizedComment}`) diff --git a/package.json b/package.json index 9b7a8bc..8a75867 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "module": "index.ts", "type": "module", "scripts": { - "start": "bun run index.ts", + "start": "NODE_ENV=production bun run index.ts", "dev": "NODE_ENV=dev bun run index.ts --watch", "lint": "eslint --fix .", "prepare": "husky", diff --git a/test/manageMrEvent.test.ts b/test/manageMrEvent.test.ts index 912d253..8496fa5 100644 --- a/test/manageMrEvent.test.ts +++ b/test/manageMrEvent.test.ts @@ -18,7 +18,7 @@ test("manageMrEvent", async () => { id: 139032, }, object_attributes: { - iid: 502, + iid: 505, state: "opened", }, }