From 86139eec3c1974fb9dc8c033421a2fb9d89dd4b2 Mon Sep 17 00:00:00 2001 From: "Randolph W. Aarseth II" Date: Sat, 30 Nov 2024 02:52:50 -0700 Subject: [PATCH] o.o --- cicd/scripts/changelog.js | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/cicd/scripts/changelog.js b/cicd/scripts/changelog.js index 0cb7d2e..1abd656 100644 --- a/cicd/scripts/changelog.js +++ b/cicd/scripts/changelog.js @@ -99,6 +99,12 @@ async function generateChangelog(baseBranch, currentBranch, outputDir = __dirnam for (const commit of commits) { const commitSha = commit.sha; const commitMessage = commit.commit.message; + const regex = /#(skip)/ig; + const matches = commitMessage.match(regex); + + if (matches) { + continue; + } const commitDate = new Date(commit.commit.committer.date); const commitUser = commit.committer.login; // The username of the person who made the commit const prNumber = extractPRNumberFromCommitMessage(commitMessage); @@ -139,17 +145,17 @@ async function generateChangelog(baseBranch, currentBranch, outputDir = __dirnam // Count PRs if (prNumber) { totalPRs++; - } else { - if (semVerLabel === "major") { - version.major++; - version.minor = 0; - version.patch = 0; - } else if (semVerLabel === "minor") { - version.minor++; - version.patch = 0; - } else { - version.patch++; - } + } + + if (semVerLabel === "major") { + version.major++; + version.minor = 0; + version.patch = 0; + } else if (semVerLabel === "minor") { + version.minor++; + version.patch = 0; + } else if (!prNumber) { + version.patch++; } }