From 9c7f79940682ca22dbe44c024bb59e8529718891 Mon Sep 17 00:00:00 2001 From: Stella Laurenzo Date: Sun, 21 Apr 2024 21:25:26 -0700 Subject: [PATCH] Exclude more generated and only run on changed. --- .github/workflows/pre-commit.yml | 5 +++++ .pre-commit-config.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 2b11178bf9448..4fcde12936bcb 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,5 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + # requites to grab the history of the PR + fetch-depth: 0 - uses: actions/setup-python@v3 - uses: pre-commit/action@v3.0.1 + with: + extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9b0f93e0651c4..b7d58d956fd92 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -exclude: "GeneratedTorchOps\\.td|\\.excalidraw" +exclude: "GeneratedTorchOps\\.td|abstract_interp_lib_gen\\.py|\\.excalidraw" repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.2.0