diff --git a/dist/index.js b/dist/index.js index 43f81d1..b0db59f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -108,16 +108,7 @@ function checkTitle(fullTitle) { throw new Error("Unexpected space between and (e.g. [: ]), there should be no space (e.g. [:])."); } if (!/^\[[a-zA-Z0-9\\/]+(?::[a-zA-Z0-9\\/]+)?\] /.test(title)) { - throw new Error( - `Invalid PR title format. ${ - hasSysadminTag ? `Your title must start with ${sysadminTag} and` : - hasSecurityTag ? `Your title must start with ${securityTag} and` : - "Your title" - } should adhere to the format: [:] followed by a space before the description.\n` + - `Where is one of: ${allowedTypes.join(", ")}\n` + - `And is one of: ${allowedModules.join(", ")}\n` + - `For detailed guidelines, refer to https://submitty.org/developer/getting_started/make_a_pull_request.` - ); + throw new Error(`Invalid title format, must start with ${hasSysadminTag ? sysadminTag : ""}${hasSecurityTag ? securityTag : ""}[:] and have space before description.`); } const errors = []; const [_, type, module, message,] = /^\[([a-zA-Z0-9\\/]+)(?::([a-zA-Z0-9\\/]+))?\] (.*)/.exec(title);