diff --git a/.github/workflows/formatting_testing.yml b/.github/workflows/formatting_testing.yml index b4b55d4..93865d5 100644 --- a/.github/workflows/formatting_testing.yml +++ b/.github/workflows/formatting_testing.yml @@ -25,7 +25,18 @@ jobs: - name: pip freeze run: python -m pip freeze --local shell: bash + + - name: Get changed files + id: changed-files + run: | + echo "::set-output name=files::$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...${{ github.event.pull_request.head.sha }})" - name: run pre-commit - run: pre-commit run --color=always --show-diff-on-failure + run: | + FILES="${{ steps.changed-files.outputs.files }}" + if [ -n "$FILES" ]; then + echo "$FILES" | xargs pre-commit run --files + else + echo "No files to check." + fi shell: bash diff --git a/src/constants.py b/src/constants.py index 649f8d7..39390f6 100644 --- a/src/constants.py +++ b/src/constants.py @@ -32,6 +32,9 @@ class Actions(IntEnum): DEBUG = os.environ.get("DEBUG", "True") in ["True"] TEAM_TELEGRAM_IDS = json.loads(os.environ.get("TEAM_TELEGRAM_IDS", "[]")) +def mm(): + pass + def get_uri(): return os.environ.get(