From 895376c0392c033169880e57428ab18d846969a8 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 31 Jul 2020 13:05:20 +0100 Subject: [PATCH] Try manually adding remote and fetching to get the refs Also, add 'end' to 'Show github context' --- .github/workflows/pr-checks.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 179cc174..e908063b 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -21,6 +21,7 @@ jobs: steps: - name: Show github context run: | + env cat $GITHUB_EVENT_PATH #################################################################### @@ -56,12 +57,15 @@ jobs: #################################################################### - name: Lint with flake8 env: - BASE_REPO: ${{github.event.pull_request.base.repo.owner.login}} + BASE_REPO_URL: ${{github.event.pull_request.base.repo.url}} + BASE_REPO_OWNER: ${{github.event.pull_request.base.repo.owner.login}} BASE_REF: ${{github.base_ref}} run: | + git remote add ${BASE_REPO_OWNER} ${BASE_REPO_URL} + git fetch ${BASE_REPO_OWNER} # stop the build if there are Python syntax errors or undefined names, ignore existing - git diff "refs/remotes/${BASE_REPO}/${BASE_REF}" -- | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --diff + git diff "refs/remotes/${BASE_REPO_OWNER}/${BASE_REF}" -- | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --diff # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - git diff "refs/remotes/${BASE_REPO}/${BASE_REF}" -- | flake8 . --count --exit-zero --statistics --diff + git diff "refs/remotes/${BASE_REPO_OWNER}/${BASE_REF}" -- | flake8 . --count --exit-zero --statistics --diff ####################################################################