From d7752c93195b34c76732ab94836cacf4386e7039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99dzich?= Date: Thu, 15 Jan 2026 10:00:05 +0100 Subject: [PATCH] Add SIGTERM handler --- index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 0d8433b..9b7ac25 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,8 @@ import { run } from 'probot'; import appFn from './appFn'; -run(appFn); +run(appFn).then((server) => { + process.on('SIGTERM', async () => { + await server.stop(); + }); +});