fix(router): require clownfish automerge command

This commit is contained in:
Vincent Koc 2026-04-29 01:19:28 -07:00
parent 6c1fe749a3
commit 9885ef4ae6
No known key found for this signature in database
2 changed files with 1 additions and 7 deletions

View File

@ -113,8 +113,6 @@ export function buildAutomergeMergeArgs({ issueNumber, repo, expectedHeadSha })
export function parseCommand(body) {
for (const line of String(body ?? "").split(/\r?\n/)) {
const automerge = line.match(/^\s*\/automerge\s*$/i);
if (automerge) return commandFromText("slash", "automerge");
const autoclose = line.match(/^\s*\/autoclose(?:\s+(.+))?\s*$/i);
if (autoclose) return commandFromText("slash", `autoclose ${autoclose[1] ?? ""}`.trim());
const slash = line.match(/^\s*\/clownfish(?:\s+(.+))?\s*$/i);

View File

@ -40,11 +40,7 @@ test("parseCommand recognizes maintainer slash commands", () => {
command: "automerge",
intent: "automerge",
});
assert.deepEqual(parseCommand("/automerge"), {
trigger: "slash",
command: "automerge",
intent: "automerge",
});
assert.equal(parseCommand("/automerge"), null);
assert.deepEqual(parseCommand("/autoclose We do not plan to support this feature"), {
trigger: "slash",
command: "autoclose we do not plan to support this feature",