From c4f8cf696dd8c08e21e4dd23541b373871fa87be Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 7 Sep 2021 11:42:36 -0500 Subject: [PATCH] chore: Move from CI to pre-commit --- .github/workflows/pre-commit.yml | 12 ++++++++++++ .pre-commit-config.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..18e3325 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,12 @@ +name: pre-commit +on: + pull_request: + push: + branches: [source] +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..29f9232 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,26 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + stages: [commit] + - id: check-json + stages: [commit] + - id: check-toml + stages: [commit] + - id: check-merge-conflict + stages: [commit] + - id: check-case-conflict + stages: [commit] + - id: detect-private-key + stages: [commit] + - repo: https://github.com/crate-ci/typos + rev: v1.1.8 + hooks: + - id: typos + stages: [commit] + - repo: https://github.com/crate-ci/committed + rev: v0.2.3 + hooks: + - id: committed + stages: [commit-msg]