From 7d21082a1b53873967aa4b26babe11806b32fdc7 Mon Sep 17 00:00:00 2001 From: Marek 'seqre' Grzelak Date: Wed, 10 Jul 2024 17:57:17 -0600 Subject: [PATCH] ci: remove pre-commit workflow and use ci alternative --- .github/workflows/pre-commit.yml | 27 --------------------------- .pre-commit-config.yaml | 9 +++++++-- 2 files changed, 7 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 9a6a147..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Pre-commit checks - -on: - push: - pull_request: - -jobs: - pre-commit: - # Run on external PRs and pushes to branches on the repo - # This is to avoid double running on PRs from internal branches - if: - github.event_name == 'push' || github.event.pull_request.head.repo.full_name != - github.repository - - name: Lint checks - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Check files - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3daa82..d61b70a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,10 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks +ci: + autofix_commit_msg: "chore(pre-commit.ci): auto fixes from pre-commit.com hooks" + autoupdate_commit_msg: "deps(pre-commit.ci): pre-commit autoupdate" + autoupdate_schedule: "monthly" + fail_fast: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks @@ -21,7 +26,7 @@ repos: - id: prettier types_or: [json, yaml] - - repo: https://github.com/doublify/pre-commit-rust - rev: v1.0 + - repo: https://github.com/seqre/pre-commit-rust + rev: v0.1.0 hooks: - id: fmt