Skip to content

Commit

Permalink
o.o
Browse files Browse the repository at this point in the history
  • Loading branch information
Bioblaze committed Nov 30, 2024
1 parent 5577df4 commit 86139ee
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions cicd/scripts/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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++;
}
}

Expand Down

0 comments on commit 86139ee

Please sign in to comment.