From 1a75e5cc76c5316d43dcbfb7f6a888998252be7a Mon Sep 17 00:00:00 2001 From: Mike Grimes Date: Sat, 22 Oct 2022 11:39:35 -0600 Subject: [PATCH 1/2] update score-updater step to push to PR branch, not default branch --- .github/workflows/VerifyPR.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/VerifyPR.yml b/.github/workflows/VerifyPR.yml index be8ba6b3..935ef0f7 100644 --- a/.github/workflows/VerifyPR.yml +++ b/.github/workflows/VerifyPR.yml @@ -71,4 +71,5 @@ jobs: with: file-path: README.md commit-msg: Update score in README + branch: ${{ env.GITHUB_REF_NAME }} github-token: ${{ secrets.GITHUB_TOKEN }} From 52ab4e7c5887f69ccdc5bd49cdf9b1d8b4a69a0b Mon Sep 17 00:00:00 2001 From: Mike Grimes Date: Sat, 22 Oct 2022 11:50:49 -0600 Subject: [PATCH 2/2] small fix to score.sh to remove newlines at end of file --- score.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/score.sh b/score.sh index ef5dbc63..4853b7c4 100755 --- a/score.sh +++ b/score.sh @@ -1,6 +1,6 @@ if [[ $1 == '--update-readme' ]]; then export NEW_SCORE=$(python3 ./tools/python/score.py) - echo $NEW_SCORE + echo "$NEW_SCORE" python3 - <<'EOF' > README.md.tmp import sys import os @@ -18,7 +18,7 @@ print( ) ) EOF -mv README.md.tmp README.md +sed '$ { /^$/ d}' README.md.tmp > README.md # removes extra newlines at end of file else python3 ./tools/python/score.py "$@" fi