Skip to content

Commit

Permalink
ci: error on chore: deno_core upgrade pr titles (denoland#24179)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jun 11, 2024
1 parent 17e1219 commit 68e1823
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/verify_pr_title.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ if (prTitle == null) {

console.log("PR title:", prTitle);

if (
prTitle.startsWith("chore:") && prTitle.contains("deno_core") &&
(prTitle.contains("upgrade") || prTitle.contains("update"))
) {
console.error([
"Please categorize this deno_core upgrade as a 'feat:', 'fix:' or a ",
"'refactor:'. If your upgrade does not fall into either of these ",
"categories, wait until the next deno_core release.\n\n",
"For feats and fixes, please title your PR outlining the fixed issue ",
"rather than just `fix: upgrade deno_core` so that users understand the ",
"change that was made in the changelog.",
].join(""));
Deno.exit(1);
}

// This is a release PR, so it's valid.
if (/^[^\s]+\.[^\s]+\.[^\s]+$/.test(prTitle)) {
console.log("Valid.");
Expand Down

0 comments on commit 68e1823

Please sign in to comment.