From c732da3f564f4ecda3fa4c1157a483cb91800534 Mon Sep 17 00:00:00 2001 From: Alexei95 Date: Mon, 15 Nov 2021 16:23:46 +0100 Subject: [PATCH] Add pre-commit.ci config. Add pre-commit config for GitHub Actions CI. --- .github/workflows/pre-commit-ci.yml | 19 +++++++++++++++++++ .pre-commit-config.yaml | 13 +++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/pre-commit-ci.yml diff --git a/.github/workflows/pre-commit-ci.yml b/.github/workflows/pre-commit-ci.yml new file mode 100644 index 00000000..d37d6438 --- /dev/null +++ b/.github/workflows/pre-commit-ci.yml @@ -0,0 +1,19 @@ +name: pre-commit-ci + +# we run pre-commit only on push +on: + - push + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + # to have unlimited depth for pushing + fetch-depth: 0 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.3 + # to allow pushing + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7ae749c..06aca018 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -82,3 +82,16 @@ repos: # dependencies available --ignore-missing-imports ] + + +# continuous integration configuration for pre-commit.ci +# freely available to open-source repositories +# it will not be run until we are open-source +ci: + autofix_commit_msg: | + [pre-commit.ci] auto fixes from pre-commit hooks + autofix_prs: true + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' + autoupdate_schedule: weekly + skip: [] + submodules: false