allow empty committer

This commit is contained in:
lichao127 2024-07-10 12:44:23 -07:00
parent cd5c7e4b8b
commit efe7663226
No known key found for this signature in database
GPG key ID: F9277D26D38C3D9A

View file

@ -156,6 +156,8 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
core.startGroup('Configuring the committer and author')
const parsedAuthor = utils.parseDisplayNameEmail(inputs.author)
const parsedCommitter = utils.parseDisplayNameEmail(inputs.committer)
if (inputs.author != "" && inputs.committer != "") {
git.setIdentityGitOptions([
'-c',
`author.name=${parsedAuthor.name}`,
@ -172,6 +174,7 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
core.info(
`Configured git author as '${parsedAuthor.name} <${parsedAuthor.email}>'`
)
}
core.endGroup()
// Create or update the pull request branch