From 0e5b5afcddce362d56b000e83cd9950474eb0dba Mon Sep 17 00:00:00 2001 From: Emil Sadek Date: Mon, 12 Jan 2026 16:32:17 -0800 Subject: [PATCH 1/2] chore: add pre-commit hooks --- .pre-commit-config.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 550aa411..a00c9bc8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,17 @@ # limitations under the License. repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-toml + - id: check-yaml + - id: detect-private-key + - id: mixed-line-ending + - id: trailing-whitespace + - repo: https://github.com/crate-ci/typos rev: bb4666ad77b539a6b4ce4eda7ebb6de553704021 # v1.42.0 hooks: From 6797e3a834ae58d1ba85beb6d5d1a9e4a2404c28 Mon Sep 17 00:00:00 2001 From: Emil Sadek Date: Wed, 21 Jan 2026 01:21:13 -0800 Subject: [PATCH 2/2] chore: add pre-commit ci job --- .github/workflows/dev_pr.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/dev_pr.yml b/.github/workflows/dev_pr.yml index 4683568d..bc856259 100644 --- a/.github/workflows/dev_pr.yml +++ b/.github/workflows/dev_pr.yml @@ -38,3 +38,23 @@ jobs: - name: Check PR title follows conventional commits spec run: | echo "${{ github.event.pull_request.title }}" | npx commitlint --extends @commitlint/config-conventional + pre-commit-hooks: + name: Run pre-commit hooks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: '3.x' + + - name: Install pre-commit + run: pip install pre-commit + + - name: Cache pre-commit + uses: actions/cache@v5 + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} + + - name: Run pre-commit + run: pre-commit run --all-files --color=always --show-diff-on-failure --verbose