Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoodness committed Feb 28, 2023
1 parent 2e7242c commit 9889961
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
2 changes: 1 addition & 1 deletion lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9889961

Please sign in to comment.