From c622e653182f70749902d3b60d0d9b2b99bafd3a Mon Sep 17 00:00:00 2001 From: nitrocode Date: Tue, 31 Aug 2021 15:39:06 -0400 Subject: [PATCH] Add inputs for user name and email --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9288218..8c44cb7 100644 --- a/index.js +++ b/index.js @@ -45,6 +45,8 @@ async function main() { ...tr.argStringToArray(core.getInput('extra_args')), ]; const token = core.getInput('token'); + const git_user_name = core.getInput('git_user_name'); + const git_user_email = core.getInput('git_user_email'); const pr = github.context.payload.pull_request; const push = !!token && !!pr; @@ -81,9 +83,9 @@ async function main() { ); if (diff) { await core.group('push fixes', async () => { - await exec.exec('git', ['config', 'user.name', 'pre-commit']); + await exec.exec('git', ['config', 'user.name', git_user_name]); await exec.exec( - 'git', ['config', 'user.email', 'pre-commit@example.com'] + 'git', ['config', 'user.email', git_user_email] ); const branch = pr.head.ref;