From 9c0170840716d08b4e762c0f2b686c6a32fd8189 Mon Sep 17 00:00:00 2001 From: Alessio Attilio Date: Thu, 26 Nov 2026 14:30:13 +0100 Subject: [PATCH] fix: trigger workflows for /reply comments The GitGitGadget app filters issue comments before dispatching the handler workflow. Allow /reply through that filter so PR owners can use the mailing-list reply command. --- GitGitGadget/index.js | 2 +- __tests__/index.test.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/GitGitGadget/index.js b/GitGitGadget/index.js index e2cc542..bb780f4 100644 --- a/GitGitGadget/index.js +++ b/GitGitGadget/index.js @@ -103,7 +103,7 @@ module.exports = async (context, req) => { } /* Only trigger the Pipeline for valid commands */ - if (!comment.body || !comment.body.match(/^\/(submit|preview|allow|disallow|test|cc)\b/)) { + if (!comment.body || !comment.body.match(/^\/(submit|preview|allow|disallow|test|cc|reply)\b/)) { context.res = { body: `Not a command: '${comment.body}'`, }; diff --git a/__tests__/index.test.js b/__tests__/index.test.js index 3457364..be12273 100644 --- a/__tests__/index.test.js +++ b/__tests__/index.test.js @@ -159,6 +159,15 @@ testIssueComment('/test', async (context) => { expect(mockRequest.end).not.toHaveBeenCalled() }) +testIssueComment('/reply \nThanks', async (context) => { + expect(context.done).not.toHaveBeenCalled() + expect(context.res).toEqual({ + body: 'Okay, triggered !' + }) + expect(mockRequest.write).not.toHaveBeenCalled() + expect(mockRequest.end).not.toHaveBeenCalled() +}) + testIssueComment('/verify-repository', 'nope', (context) => { expect(context.done).not.toHaveBeenCalled() expect(context.res).toEqual({