File diff suppressed because one or more lines are too long
@@ -227,7 +227,12 @@ async function checkInputs() {
|
|||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
// #region author_name, author_email
|
// #region author_name, author_email
|
||||||
|
if (getInput('author_name') && getInput('author_email')) {
|
||||||
|
info('> Using author info from inputs...')
|
||||||
|
} else {
|
||||||
|
info('> Some author info is missing, filling from workflow event...')
|
||||||
let author = event?.head_commit?.author
|
let author = event?.head_commit?.author
|
||||||
|
|
||||||
if (sha && !author) {
|
if (sha && !author) {
|
||||||
info(
|
info(
|
||||||
'> Unable to get commit from workflow event: trying with the GitHub API...'
|
'> Unable to get commit from workflow event: trying with the GitHub API...'
|
||||||
@@ -252,7 +257,7 @@ async function checkInputs() {
|
|||||||
author = commit?.commit?.author
|
author = commit?.commit?.author
|
||||||
}
|
}
|
||||||
|
|
||||||
if (author) {
|
if (typeof author == 'object') {
|
||||||
setDefault('author_name', author.name)
|
setDefault('author_name', author.name)
|
||||||
setDefault('author_email', author.email)
|
setDefault('author_email', author.email)
|
||||||
}
|
}
|
||||||
@@ -271,6 +276,7 @@ async function checkInputs() {
|
|||||||
setDefault('author_name', 'Add & Commit Action')
|
setDefault('author_name', 'Add & Commit Action')
|
||||||
setDefault('author_email', 'actions@github.com')
|
setDefault('author_email', 'actions@github.com')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
info(
|
info(
|
||||||
`> Using '${getInput('author_name')} <${getInput(
|
`> Using '${getInput('author_name')} <${getInput(
|
||||||
|
|||||||
Reference in New Issue
Block a user