From d87d00aca42680ba69fb69a1fc72970b9e71b54e Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 11 Jan 2024 18:22:19 +0000 Subject: [PATCH] test --- .../__main__.py | 4 +-- .../notify-new-contribution-agreement.yaml | 27 +++++++++---------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/scripts/python/notify-new-contribution-agreement/__main__.py b/.github/scripts/python/notify-new-contribution-agreement/__main__.py index 28c9a860..a1838566 100644 --- a/.github/scripts/python/notify-new-contribution-agreement/__main__.py +++ b/.github/scripts/python/notify-new-contribution-agreement/__main__.py @@ -72,6 +72,7 @@ def agreement_is_different(): # Check if the contributing file is different. if all(file != CONTRIBUTING_FILE_NAME for file in diff_output.splitlines()): + print(f"{CONTRIBUTING_FILE_NAME} is not different.") return False previous_agreement_end_line_index = get_previous_agreement_end_line_index() @@ -123,6 +124,7 @@ def agreement_is_different(): except StopIteration: pass + print("All differences are after the end of the agreement.") return False @@ -168,8 +170,6 @@ def send_emails(auth: str, contributors: Contributors): contributors: The email addresses to send the email to. """ - contributors = {"stefan.kairinos@ocado.com"} # TODO: remove - failed_sends = False for contributor in contributors: diff --git a/.github/workflows/notify-new-contribution-agreement.yaml b/.github/workflows/notify-new-contribution-agreement.yaml index f0d751b4..243dfcba 100644 --- a/.github/workflows/notify-new-contribution-agreement.yaml +++ b/.github/workflows/notify-new-contribution-agreement.yaml @@ -17,20 +17,17 @@ jobs: - name: 🛫 Checkout uses: actions/checkout@v4 with: - fetch-depth: 0 # get current and previous commit + fetch-depth: 2 # get current and previous commit - - name: Test - run: echo "test $(git --no-pager diff HEAD~1:CONTRIBUTING.md CONTRIBUTING.md)" - - # - name: 🐍 Set up Python ${{ env.PYTHON_VERSION }} Environment - # uses: ocadotechnology/codeforlife-workspace/.github/actions/python/setup-environment@main - # with: - # checkout: 'false' - # python-version: ${{ env.PYTHON_VERSION }} - # working-directory: ${{ env.WORKING_DIR }} + - name: 🐍 Set up Python ${{ env.PYTHON_VERSION }} Environment + uses: ocadotechnology/codeforlife-workspace/.github/actions/python/setup-environment@main + with: + checkout: 'false' + python-version: ${{ env.PYTHON_VERSION }} + working-directory: ${{ env.WORKING_DIR }} - # - name: 🏃 Run Script - # working-directory: ${{ env.WORKING_DIR }} - # run: pipenv run python . - # env: - # AUTH: ${{ secrets.DOTDIGITAL_API_USER_AUTH }} + - name: 🏃 Run Script + working-directory: ${{ env.WORKING_DIR }} + run: pipenv run python . + env: + AUTH: ${{ secrets.DOTDIGITAL_API_USER_AUTH }}