From 027f794c90046ef7f1ed3c3a5be75619b992ebbf Mon Sep 17 00:00:00 2001 From: Milan Malfait Date: Thu, 22 Feb 2024 15:34:41 +0000 Subject: [PATCH] Add copyright headers check to pre-commit (#317) * Add copyright headers check to pre-commit * Remove copyright linter from GHA (now part of pre-commit) --- .github/workflows/main.yml | 3 --- .pre-commit-config.yaml | 5 +++++ {.github => bin}/linters/check_headers_exist.sh | 0 3 files changed, 5 insertions(+), 3 deletions(-) rename {.github => bin}/linters/check_headers_exist.sh (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30ae15d95..81b730343 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,9 +33,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Ensure copyright and license header are present - run: ./.github/linters/check_headers_exist.sh - - name: Run pre-commit uses: pre-commit/action@v3.0.0 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 035345532..bda55d38f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,3 +30,8 @@ repos: entry: mypy args: ['--config-file=setup.cfg'] additional_dependencies: ['mypy', 'types-PyYAML', 'types-requests', 'types-python-slugify', 'types-psycopg2'] + - id: copyright-headers + name: copyright-headers + language: script + entry: bin/linters/check_headers_exist.sh + diff --git a/.github/linters/check_headers_exist.sh b/bin/linters/check_headers_exist.sh similarity index 100% rename from .github/linters/check_headers_exist.sh rename to bin/linters/check_headers_exist.sh