5
0
Fork 0
mirror of https://github.com/pre-commit/action.git synced 2025-11-09 03:26:56 +00:00

Add inputs for user name and email

This commit is contained in:
nitrocode 2021-08-31 15:39:06 -04:00 committed by GitHub
parent db6d0e3ee6
commit c622e65318
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;