diff --git a/.github/actions/conventional-pr/src/utils.ts b/.github/actions/conventional-pr/src/utils.ts index fbcbc1f77b..5e76cc4f11 100644 --- a/.github/actions/conventional-pr/src/utils.ts +++ b/.github/actions/conventional-pr/src/utils.ts @@ -14,6 +14,7 @@ const validTypes = [ 'ci', 'chore', 'revert', + 'release', ]; const typeList = validTypes.map(t => ` - ${t}`).join('\n'); @@ -28,22 +29,25 @@ export function validateTitle(title: string): ValidationResult { const hastype = validTypes.some(t => title.startsWith(`${t}: `)); if (!hastype) { - core.info( - `[Title] Missing type in title. Choose from the following:\n${typeList}` + errors.push( + `[Title] Must start with type (ex. 'feat: ').\nThe valid types are:\n${typeList}` ); - errors.push("[Title] Must start with type. i.e. 'feat: '"); } return errors; } const refMatch = /(refs?|close(d|s)?|fix(ed|es)?) \#\d+/i; +const helpLink = + 'https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords'; export function validateBody(body: string): ValidationResult { let errors: ValidationResult = []; if (!refMatch.test(body)) { - errors.push('[Body] Must reference an issue.'); + errors.push( + `[Body] Must reference an issue (ex. 'fixes #1234').\nSee ${helpLink} for more details.` + ); } return errors;