From 9885ce35ef13f5eb35c2a3935343ca8e3e27cc56 Mon Sep 17 00:00:00 2001 From: harry Date: Mon, 28 Apr 2025 10:01:19 +0100 Subject: [PATCH] fixes the guide comment remover [no gbp] (#90866) Co-authored-by: harryob <55142896+harryob@users.noreply.github.com> --- tools/pull_request_hooks/removeGuideComments.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/pull_request_hooks/removeGuideComments.js b/tools/pull_request_hooks/removeGuideComments.js index 164470d84c9..9b74d6b63f4 100644 --- a/tools/pull_request_hooks/removeGuideComments.js +++ b/tools/pull_request_hooks/removeGuideComments.js @@ -16,7 +16,11 @@ function escapeRegex(string) { } export async function removeGuideComments({ github, context }) { - const originalBody = (await github.rest.pulls.get(context.issue)).body; + const originalBody = (await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + })).data.body; if (!originalBody) { console.log("PR body is empty, skipping...");