From bc6472985758fc388f9a2ac4a4da11c1bf6e0be6 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Tue, 17 Jan 2023 14:36:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20github=20push=20event=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8F=90=E4=BA=A4=E8=80=85=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/com.msgbyte.github/services/subscribe.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/plugins/com.msgbyte.github/services/subscribe.service.ts b/server/plugins/com.msgbyte.github/services/subscribe.service.ts index 966ddd2f..247276f8 100644 --- a/server/plugins/com.msgbyte.github/services/subscribe.service.ts +++ b/server/plugins/com.msgbyte.github/services/subscribe.service.ts @@ -173,11 +173,12 @@ class GithubSubscribeService extends TcService { if ('pusher' in event) { // Is push event const name = event.pusher.name; + const userUrl = event.sender.html_url; const repo = event.repository.full_name; const compareUrl = event.compare; const commits = event.commits.map((c) => `- ${c.message}`).join('\n'); - const message = `${name} 在 ${repo} 提交了新的内容:\n${commits}\n\n查看改动: ${compareUrl}`; + const message = `[url=${userUrl}]${name}[/url] 在 ${repo} 提交了新的内容:\n${commits}\n\n查看改动: ${compareUrl}`; await this.sendMessageToSubscribes(ctx, repo, message); } else if ('pull_request' in event) {