From 988996192f4ffd230798af3f04ec23c105c1fd72 Mon Sep 17 00:00:00 2001 From: Michael Goodness Date: Tue, 28 Feb 2023 12:33:48 -0600 Subject: [PATCH] fix: formatting --- lib/api.js | 7 ++++--- lib/common.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/api.js b/lib/api.js index 09f6f3b4..1b48692a 100644 --- a/lib/api.js +++ b/lib/api.js @@ -29,9 +29,10 @@ const MAX_PR_COUNT = 10; async function executeLocally(context, url) { const { octokit, config } = context; - hostname = config.hostname.replace(/(\.)/g, '\\$&'); - const URL_REGEXP = - new RegExp('^https:\/\/' + hostname + '\/([^/]+)\/([^/]+)\/(pull|tree)\/([^ ]+)$'); + const hostname = config.hostname.replace(/\./g, "\\$&"); + const URL_REGEXP = new RegExp( + "^https://" + hostname + "/([^/]+)/([^/]+)/(pull|tree)/([^ ]+)$" + ); const m = url.match(URL_REGEXP); if (m && m[3] === "pull") { diff --git a/lib/common.js b/lib/common.js index d3d780a5..3ca26eee 100644 --- a/lib/common.js +++ b/lib/common.js @@ -188,7 +188,7 @@ function createConfig(env = {}) { const pullRequest = parsePullRequest(env.PULL_REQUEST); - const hostname = env.GHE_HOSTNAME || "github.com" + const hostname = env.GHE_HOSTNAME || "github.com"; return { mergeLabels,