From fe600b419dfc3256509861a7f89364f92f33a3c8 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Thu, 26 Feb 2026 01:38:52 -0800 Subject: [PATCH 1/4] Add pre-commit auto-update workflow --- .github/workflows/pre-commit-autoupdate.yml | 52 +++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/pre-commit-autoupdate.yml diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml new file mode 100644 index 0000000..8f3b719 --- /dev/null +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -0,0 +1,52 @@ +name: Autoupdate pre-commit + +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '28 2 * * 6' # Saturday at 02:28 UTC + workflow_dispatch: + +permissions: read-all + +jobs: + autoupdate: + name: Autoupdate + + runs-on: ubuntu-latest + timeout-minutes: 10 + + permissions: + # Needed to create a PR with autoupdate changes + contents: write + pull-requests: write + + steps: + - name: Checkout mkl-service repo + uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v4.2.2 + + - name: Set up python + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v5.6.0 + with: + python-version: '3.13' + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit autoupdate + run: pre-commit autoupdate + + - name: Create a PR with autoupdate changes + uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 #v8.1.0 + with: + commit-message: 'chore: update pre-commit hooks' + add-paths: .pre-commit-config.yaml + branch: 'bot/pre-commit-autoupdate' + delete-branch: true + title: Weekly pre-commit autoupdate + body: | + This PR updates the `.pre-commit-config.yaml` using `pre-commit autoupdate`. + labels: autoupdate From cddac13b2cdc803f98c56a4ffce3732c42b82c61 Mon Sep 17 00:00:00 2001 From: ndgrigorian <46709016+ndgrigorian@users.noreply.github.com> Date: Thu, 26 Feb 2026 07:45:41 -0800 Subject: [PATCH 2/4] Update .github/workflows/pre-commit-autoupdate.yml Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com> Update .github/workflows/pre-commit-autoupdate.yml Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com> Update .github/workflows/pre-commit-autoupdate.yml Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com> --- .github/workflows/pre-commit-autoupdate.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 8f3b719..48df562 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -26,12 +26,12 @@ jobs: steps: - name: Checkout mkl-service repo - uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v4.2.2 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v5.6.0 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: '3.13' + python-version: '3.14' - name: Install pre-commit run: pip install pre-commit From 818ab315abc2ae93d445a3c62ce3932685c1f211 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Thu, 26 Feb 2026 13:44:18 -0800 Subject: [PATCH 3/4] Apply review comment --- .github/workflows/pre-commit-autoupdate.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 48df562..40a1b32 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -1,14 +1,11 @@ name: Autoupdate pre-commit on: - # For Branch-Protection check. Only the default branch is supported. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection - branch_protection_rule: + workflow_dispatch: # To guarantee Maintained check is occasionally updated. See # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained schedule: - cron: '28 2 * * 6' # Saturday at 02:28 UTC - workflow_dispatch: permissions: read-all From ab8528e4730511aaf9aea39b5c960fed6c88c918 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Thu, 26 Feb 2026 14:05:05 -0800 Subject: [PATCH 4/4] apply review comment --- .github/workflows/pre-commit-autoupdate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 40a1b32..9932672 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -37,7 +37,7 @@ jobs: run: pre-commit autoupdate - name: Create a PR with autoupdate changes - uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 #v8.1.0 + uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 with: commit-message: 'chore: update pre-commit hooks' add-paths: .pre-commit-config.yaml