fix: bad wspace handling

This commit is contained in:
zkldi
2024-04-25 12:00:30 +01:00
parent d11abb2de4
commit 586e8ec4e2
+4 -1
View File
@@ -96,7 +96,10 @@ app.webhooks.on(["issue_comment.created"], async ({ octokit, payload }) => {
const body = payload.comment.body.trim();
if (body.startsWith("+bot")) {
const cmd = body.split(" ")[1]?.replace(/[^a-z]/u, "");
const cmd = body
.split("\n")[0]!
.split(/\s+/u)[1]
?.replace(/[^a-z]/u, "");
switch (cmd) {
case "ping": {