Skip to content

Commit 92d06a3

Browse files
committed
chore: update and extend pre-commit hooks, add autoupdate workflow
1 parent 8e822a4 commit 92d06a3

File tree

3 files changed

+66
-21
lines changed

3 files changed

+66
-21
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: 'Update pre-commit hooks'
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * 1'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: 'write'
10+
pull-requests: 'write'
11+
12+
jobs:
13+
update:
14+
runs-on: 'ubuntu-latest'
15+
steps:
16+
- name: 'Checkout repository'
17+
uses: 'actions/checkout@v4'
18+
19+
- name: 'Set up Python'
20+
uses: 'actions/setup-python@v5'
21+
with:
22+
python-version: '3.12'
23+
24+
- name: 'Install pre-commit'
25+
run: 'pip install pre-commit'
26+
27+
- name: 'Run pre-commit autoupdate'
28+
run: 'pre-commit autoupdate'
29+
30+
- name: 'Create Pull Request'
31+
uses: 'peter-evans/create-pull-request@v7'
32+
with:
33+
commit-message: 'chore: update pre-commit hooks'
34+
title: 'chore: update pre-commit hooks'
35+
body: 'Automatic pre-commit hook version update.'
36+
branch: 'chore/pre-commit-autoupdate'
37+

.pre-commit-config.yaml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
repos:
2-
- repo: https://github.com/digitalpulp/pre-commit-php
3-
rev: 1.4.0
4-
hooks:
5-
- id: php-lint-all
6-
- repo: https://github.com/gitleaks/gitleaks
7-
rev: v8.16.3
8-
hooks:
9-
- id: gitleaks
10-
- repo: https://github.com/jumanjihouse/pre-commit-hooks
11-
rev: 3.0.0
12-
hooks:
13-
- id: shellcheck
14-
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.4.0
16-
hooks:
17-
- id: end-of-file-fixer
18-
- id: trailing-whitespace
19-
- repo: https://github.com/pylint-dev/pylint
20-
rev: v2.17.2
21-
hooks:
22-
- id: pylint
2+
- repo: 'https://github.com/digitalpulp/pre-commit-php'
3+
rev: '1.4.0'
4+
hooks:
5+
- id: 'php-lint-all'
6+
7+
- repo: 'https://github.com/gitleaks/gitleaks'
8+
rev: 'v8.30.1'
9+
hooks:
10+
- id: 'gitleaks'
11+
12+
- repo: 'https://github.com/jumanjihouse/pre-commit-hooks'
13+
rev: '3.0.0'
14+
hooks:
15+
- id: 'shellcheck'
16+
17+
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
18+
rev: 'v6.0.0'
19+
hooks:
20+
- id: 'check-added-large-files'
21+
- id: 'check-merge-conflict'
22+
- id: 'check-yaml'
23+
- id: 'end-of-file-fixer'
24+
- id: 'trailing-whitespace'
25+
26+
- repo: 'https://github.com/pylint-dev/pylint'
27+
rev: 'v4.0.5'
28+
hooks:
29+
- id: 'pylint'

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
### Changed
1212

13+
* Update and extend pre-commit hooks (add `check-added-large-files`, `check-merge-conflict`, `check-yaml`; update all hook versions)
1314
* Unify CONTRIBUTING and enhance it with the official Monitoring Plugins and Nagios Plugin Development Guidelines
1415

1516
### Breaking Changes

0 commit comments

Comments
 (0)