Skip to content

Commit f5a90a2

Browse files
committed
modift mastadon regex to allow for subdomains
1 parent f1ba757 commit f5a90a2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scripts/utils.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports.Schema = Joi.object({
6161
.valid(...flags)
6262
.required(),
6363
twitter: Joi.string().pattern(new RegExp(/^@?(\w){1,15}$/)),
64-
mastodon: Joi.string().pattern(new RegExp(/^@(\w){1,30}@(\w)+\.(\w)+$/)),
64+
mastodon: Joi.string().pattern(new RegExp(/^@(\w){1,30}@(\w)+\.(.?\w)+$/)),
6565
emoji: Joi.string().allow(''),
6666
computer: Joi.string().valid('apple', 'windows', 'linux', 'bsd'),
6767
phone: Joi.string().valid('iphone', 'android', 'windowsphone', 'flipphone'),
@@ -112,15 +112,13 @@ module.exports.communicateValidationOutcome = async function (
112112
].join('\n');
113113
}
114114

115-
116115
const { GITHUB_TOKEN } = process.env;
117116
const { context } = github;
118117
if (!GITHUB_TOKEN || !context.payload.pull_request) {
119118
core.error(
120119
'Cannot add a comment if GITHUB_TOKEN or context.payload.pull_request is not set'
121120
);
122121
core.info(`Comment contents:\n${comment}`);
123-
return;
124122
}
125123
// TODO: Re-enable a way to comment on PRs that tests passed.
126124
// const pullRequestNumber = context.payload.pull_request.number;

0 commit comments

Comments
 (0)