Skip to content

Commit

Permalink
fix: always return false if a release commit is found
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Jan 19, 2023
1 parent 46733a0 commit fbe1937
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/shouldSemanticRelease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ export async function shouldSemanticRelease({

log(`Checking up to ${history.length} commits for release readiness...`);

for (let i = 0; i < history.length; i += 1) {
const message = history[i];
for (const message of history) {
log(`Checking commit: ${message}`);
// If the commit is a release, we should only release if other commits have been found
if (isReleaseCommit(message)) {
const result = !!i;
log(`Found a release commit. Returning ${result}.`);
return result;
log(`Found a release commit. Returning false.`);
return false;
}

// Otherwise, we should release if a non-ignored commit type is found
Expand Down

0 comments on commit fbe1937

Please sign in to comment.