From d142950987ea0cb750e21785ad86ffc7549eca19 Mon Sep 17 00:00:00 2001 From: Haruyaki <52639021+HarunamiYaki@users.noreply.github.com> Date: Sun, 15 Oct 2023 16:31:27 +0700 Subject: [PATCH] fix: Add reply outside core dir --- src/index.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7f4f821..3ca5b36 100644 --- a/src/index.ts +++ b/src/index.ts @@ -244,7 +244,17 @@ module.exports = (app: Probot) => { }); }); } else { - return; + const username = context.payload.sender.login; + const propened = context.issue({ + body: `Hello @${username} Thank you for submitting Pull Request, please wait for next notification after we review your Pull Request` + }); + console.log('Pull request opened'); + await context.octokit.issues.createComment(propened); + await context.octokit.issues.addLabels( + context.issue({ + labels: ['Pending'] + }) + ); } }); } else {