Skip to content

Commit

Permalink
Throw instead of log
Browse files Browse the repository at this point in the history
  • Loading branch information
m7kvqbe1 committed Oct 11, 2024
1 parent c73e43f commit 4030643
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const validateIssue = (issue, TARGET_LABELS) => {
}

if (!issue.labels.some((label) => TARGET_LABELS.includes(label.name))) {
console.log(`Issue #${issue.number} does not have a target label`);
return false;
throw new Error(`Issue #${issue.number} does not have a target label`);
}

return true;
Expand Down

0 comments on commit 4030643

Please sign in to comment.