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 authored and KeithWiles committed Nov 25, 2024
1 parent f500890 commit 291371a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pre-commit-auto-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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
6 changes: 3 additions & 3 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,13 +12,13 @@ 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++, c]
args: [-i, --style=file]
- 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 Down

0 comments on commit 291371a

Please sign in to comment.