From 152b8c00c6d43e154f922a691770e66940bbaaaa Mon Sep 17 00:00:00 2001 From: --global Date: Wed, 25 Nov 2020 20:28:15 +0100 Subject: [PATCH] Move git user config --- tests/git-auto-commit.bats | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/git-auto-commit.bats b/tests/git-auto-commit.bats index 8c9cc2a..a3f8694 100644 --- a/tests/git-auto-commit.bats +++ b/tests/git-auto-commit.bats @@ -22,6 +22,12 @@ setup() { export INPUT_PUSH_OPTIONS="" export INPUT_SKIP_DIRTY_CHECK=false + # Configure Git + if [[ -z $(git config user.name) ]]; then + git config --global user.name "Test Suite" + git config --global user.email "test@github.com" + fi + # Create and setup some fake repositories for testing _setup_fake_remote_repository _setup_local_repository @@ -60,15 +66,6 @@ _setup_local_repository() { git clone "${FAKE_REMOTE}" "${FAKE_LOCAL_REPOSITORY}" cd "${FAKE_LOCAL_REPOSITORY}"; - - # Configure Git - # if [[ -z $(git config user.name) ]]; then - # git config --global user.name "Test Suite" - # git config --global user.email "test@github.com" - # fi - - git config --global user.name "Test Suite" - git config --global user.email "test@github.com" } # Run the main code related to this GitHub Action