From dc927c922124d8398cd2742ac6b59bd43d425b40 Mon Sep 17 00:00:00 2001 From: rhysd Date: Sat, 16 Nov 2019 09:39:18 +0900 Subject: [PATCH] v1.1.3 --- git.js | 3 ++- write.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/git.js b/git.js index 1f006d213..2bc5c7734 100644 --- a/git.js +++ b/git.js @@ -39,7 +39,8 @@ async function capture(cmd, args) { } async function cmd(...args) { core.debug(`Executing Git: ${args.join(' ')}`); - const res = await capture('git', args); + const userArgs = ['-c', 'user.name=github-action-benchmark', '-c', 'user.email=github@users.noreply.github.com']; + const res = await capture('git', userArgs.concat(args)); if (res.code !== 0) { throw new Error(`Command 'git ${args.join(' ')}' failed: ${res}`); } diff --git a/write.js b/write.js index a7fc1dc32..e83cea4c3 100644 --- a/write.js +++ b/write.js @@ -100,7 +100,7 @@ async function writeBenchmark(bench, config) { await storeDataJson(dataPath, data); await git.cmd('add', dataPath); await addIndexHtmlIfNeeded(benchmarkDataDirPath); - await git.cmd('-c', 'user.name=github-action-benchmark', '-c', 'user.email=github@users.noreply.github.com', 'commit', '-m', `add ${name} (${tool}) benchmark result for ${bench.commit.id}`); + await git.cmd('commit', '-m', `add ${name} (${tool}) benchmark result for ${bench.commit.id}`); if (githubToken && autoPush) { await pushGitHubPages(githubToken, ghPagesBranch); console.log(`Automatically pushed the generated commit to ${ghPagesBranch} branch since 'auto-push' is set to true`);