From f5a90a2c0dc89da1346c45c17f05f3d2d2ef9af1 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Wed, 16 Oct 2024 10:18:23 -0400 Subject: [PATCH] modift mastadon regex to allow for subdomains --- scripts/utils.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/utils.js b/scripts/utils.js index 2ca3c26e..4f936e65 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -61,7 +61,7 @@ module.exports.Schema = Joi.object({ .valid(...flags) .required(), twitter: Joi.string().pattern(new RegExp(/^@?(\w){1,15}$/)), - mastodon: Joi.string().pattern(new RegExp(/^@(\w){1,30}@(\w)+\.(\w)+$/)), + mastodon: Joi.string().pattern(new RegExp(/^@(\w){1,30}@(\w)+\.(.?\w)+$/)), emoji: Joi.string().allow(''), computer: Joi.string().valid('apple', 'windows', 'linux', 'bsd'), phone: Joi.string().valid('iphone', 'android', 'windowsphone', 'flipphone'), @@ -112,7 +112,6 @@ module.exports.communicateValidationOutcome = async function ( ].join('\n'); } - const { GITHUB_TOKEN } = process.env; const { context } = github; if (!GITHUB_TOKEN || !context.payload.pull_request) { @@ -120,7 +119,6 @@ module.exports.communicateValidationOutcome = async function ( 'Cannot add a comment if GITHUB_TOKEN or context.payload.pull_request is not set' ); core.info(`Comment contents:\n${comment}`); - return; } // TODO: Re-enable a way to comment on PRs that tests passed. // const pullRequestNumber = context.payload.pull_request.number;