Skip to content

Commit

Permalink
chore: update pre-commit hooks
Browse files Browse the repository at this point in the history
Run pre-commit autoupdate and add a monthly workflow
to update hooks.

Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan committed Nov 25, 2024
1 parent 59b2cfa commit 2bd0058
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 5 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pre-commit-auto-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pre-commit auto-update

on: # yamllint disable-line rule:truthy
schedule:
- cron: 0 0 1 * *

jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit autoupdate
run: pre-commit autoupdate

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-autoupdate
title: Auto-update pre-commit hooks
commit-message: Auto-update pre-commit hooks
body: |
Update pre-commit hooks to latest version
labels: dependencies
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -12,12 +12,12 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
rev: v19.1.4
hooks:
- id: clang-format
types_or: [c]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.9.2
rev: v0.15.0
hooks:
- id: markdownlint-cli2-rules-docker
- repo: https://github.com/codespell-project/codespell
Expand All @@ -28,11 +28,11 @@ repos:
additional_dependencies:
- tomli
- repo: https://github.com/golangci/golangci-lint
rev: v1.61.0
rev: v1.62.0
hooks:
- id: golangci-lint
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.16.0
rev: v9.18.0
hooks:
- id: commitlint
stages: [commit-msg]
Expand Down

0 comments on commit 2bd0058

Please sign in to comment.