From c13ca4ea7e125b6f3b2b22914905488d152f9dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Stucke?= Date: Thu, 8 Aug 2024 18:21:13 +0200 Subject: [PATCH] replaced flake8 github action with pre-commit action --- .github/workflows/Lintly-Flake8.yml | 15 --------------- .github/workflows/pre-commit.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 .github/workflows/Lintly-Flake8.yml create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/Lintly-Flake8.yml b/.github/workflows/Lintly-Flake8.yml deleted file mode 100644 index d1b8f7da..00000000 --- a/.github/workflows/Lintly-Flake8.yml +++ /dev/null @@ -1,15 +0,0 @@ -on: [pull_request] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: grantmcconnaughey/lintly-flake8-github-action@d9db4fd0be9fb1cd19206a48ec0773bd93b82cbd - with: - # The GitHub API token to create reviews with - token: ${{ secrets.GITHUB_TOKEN }} - # Fail if "new" violations detected or "any", default "new" - failIf: new - # Additional arguments to pass to flake8, default "." (current directory) - args: "--config .flake8 fact_extractor" diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..df887254 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,16 @@ +name: pre-commit + +on: + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 + with: + extra_args: --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}