diff --git a/out/github-action.cjs b/out/github-action.cjs index 7d764e2..0213068 100644 --- a/out/github-action.cjs +++ b/out/github-action.cjs @@ -87969,8 +87969,10 @@ async function run() { try { if (context.eventName === "push") { const payload = context.payload; - await import_exec.default.exec("git", ["config", "user.email", payload.pusher.email]); - await import_exec.default.exec("git", ["config", "user.name", payload.pusher.name]); + const pusherEmail = payload.pusher.email ?? `${context.actor}@users.noreply.github.com`; + const pusherName = payload.pusher.name ?? context.actor; + await import_exec.default.exec("git", ["config", "user.email", pusherEmail]); + await import_exec.default.exec("git", ["config", "user.name", pusherName]); await improveCommitMessages(payload.commits); } else { import_core22.default.error( diff --git a/src/github-action.ts b/src/github-action.ts index f3c86ef..c7e939a 100644 --- a/src/github-action.ts +++ b/src/github-action.ts @@ -175,8 +175,11 @@ async function run() { try { if (context.eventName === 'push') { const payload = context.payload as PushEvent; - await exec.exec('git', ['config', 'user.email', payload.pusher.email!]); - await exec.exec('git', ['config', 'user.name', payload.pusher.name!]); + const pusherEmail = payload.pusher.email ?? `${context.actor}@users.noreply.github.com`; + const pusherName = payload.pusher.name ?? context.actor; + + await exec.exec('git', ['config', 'user.email', pusherEmail]); + await exec.exec('git', ['config', 'user.name', pusherName]); await improveCommitMessages(payload.commits);