Skip to content

Commit 116c918

Browse files
committed
Warn only if one of the params is missing
1 parent fbbcae9 commit 116c918

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function checkInputs() {
1717
setDefault('author_name', author.name)
1818
setDefault('author_email', author.email)
1919
} else {
20-
warning(`Unable to fetch author info: couldn't find ${!eventPath ? 'event path' : !require(eventPath)?.head_commit ? 'commit' : 'commit author'}.`)
20+
if (!getInput('author_name') || !getInput('author_email')) warning(`Unable to fetch author info: couldn't find ${!eventPath ? 'event path' : !require(eventPath)?.head_commit ? 'commit' : 'commit author'}.`)
2121
setDefault('author_name', 'Add & Commit Action')
2222
setDefault('author_email', '[email protected]')
2323
}

0 commit comments

Comments
 (0)