INNER CODE UNIT · JavaScript
getCloseReason
mlocati/docker-php-extension-installer · actions/check-new-issue/src/main.js:43
function getCloseReason(version, versionLine)
{
let prefix = '';
if (versionLine !== '') {
prefix = '> ' + [
VERSION_PREVLINE,
'',
versionLine,
].join('\n> ') + '\n\n';
}
if (version === '') {
return prefix + `@${github.context.actor} please specify the \`install-php-extensions\` version you are using: it's the first line printed by the script.\n\nFor example:\n\`\`\`\ninstall-php-extensions v.X.Y.Z\n\`\`\``;
}
if (!/^\d+\.\d+\.\d+$/.test(version)) {
return prefix + `@${github.context.actor} the \`install-php-extensions\` version that you specified (\`${version}\`) is not valid.\n\nPlease specify the \`install-php-extensions\` version you are using: it's the first line printed by the script.\nFor example:\n\n\`\`\`\ninstall-php-extensions v.X.Y.Z\n\`\`\``;
}
return '';
}