Skip to content

Commit 6321395

Browse files
committed
fix: prevent the action from running on 0 commits
This happened when a push event was triggered by a tag push Ref #36
1 parent 2a626ae commit 6321395

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ async function processDirectory(dir: string, commits: LocalCommit[] | PartialCom
114114
if (commits.length >= 20)
115115
warning('This workflow run topped the commit limit set by GitHub webhooks: that means that commits could not appear and that the run could not find the version change.')
116116

117+
if (commits.length <= 0) {
118+
info('There are no commits to look at.')
119+
return
120+
}
121+
117122
await checkCommits(commits, packageObj.version)
118123
} catch (e) {
119124
setFailed(`${e}`)

0 commit comments

Comments
 (0)