Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: always return false if a release commit is found #8

Merged
merged 1 commit into from Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/shouldSemanticRelease.ts
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