From 7bc8f19a7fd7787287c02e42761602746e55c1d2 Mon Sep 17 00:00:00 2001 From: Zohan Subhash Date: Thu, 2 Mar 2023 22:51:39 +0530 Subject: [PATCH] Preview action fix (#2561) * Fix error * refactor: remove unused code --------- Co-authored-by: Rick Staa --- scripts/preview-theme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/preview-theme.js b/scripts/preview-theme.js index f5a24a80a326d..baccaa61a3a78 100644 --- a/scripts/preview-theme.js +++ b/scripts/preview-theme.js @@ -46,7 +46,7 @@ const INVALID_REVIEW_COMMENT = (commentUrl) => // Retrieve octokit instance. const OCTOKIT = github.getOctokit(getGithubToken()); -const PULL_REQUEST_ID = prNumber ? prNumber : getPrNumber(); +const PULL_REQUEST_ID = getPrNumber(); const { OWNER, REPO } = getRepoInfo(github.context); /** @@ -308,7 +308,7 @@ const DRY_RUN = process.env.DRY_RUN === "true" || false; /** * Main function. */ -export const run = async (prNumber) => { +export const run = async () => { try { debug("Retrieve action information from context..."); debug(`Context: ${inspect(github.context)}`);