From f8ffb2fc933ab68719aa861b7f4f29ecaf53e0fd Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 23 May 2020 09:54:43 -0400 Subject: [PATCH] Update entrypoint.sh --- entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index e9ee4f13..3c7f763c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,18 +11,25 @@ GITHUB_TOKEN=$1 CONFIG_PATH=$2 IGNORE_PATH=$3 TARGET_BRANCH=$GITHUB_BASE_REF +CURRENT_BRANCH=$GITHUB_HEAD_REF echo "${GITHUB_TOKEN}" echo "${CONFIG_PATH}" echo "${IGNORE_PATH}" echo "${TARGET_BRANCH}" +echo "${CURRENT_BRANCH}" echo "${GITHUB_REPOSITORY}" echo "----------------------" + git remote set-url origin https://$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY + +echo "Getting base branch..." git fetch --depth=1 origin +refs/heads/$TARGET_BRANCH:refs/remotes/origin/$TARGET_BRANCH +echo "Getting changed files..." + CHANGED_FILES=$(git diff --diff-filter=ACM --name-only $(git merge-base origin/$TARGET_BRANCH HEAD) | grep -E ".(js|jsx|ts|tsx)$$") echo "## Running ESLint"