1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

ci: error on chore: deno_core upgrade pr titles (#24179)

This commit is contained in:
David Sherret 2024-06-11 12:47:44 -04:00 committed by GitHub
parent 17e1219250
commit 68e1823426
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.");