Skip to content

Commit 58ad619

Browse files
authored
Replace pre-commit with prek in CI (#682)
1 parent afeb52c commit 58ad619

File tree

14 files changed

+63
-23
lines changed

14 files changed

+63
-23
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ updates:
1111
pip:
1212
patterns:
1313
- "*"
14+
cooldown:
15+
default-days: 7
1416

1517
# Maintain dependencies for GitHub Actions
1618
- package-ecosystem: "github-actions"
@@ -23,3 +25,5 @@ updates:
2325
actions:
2426
patterns:
2527
- "*"
28+
cooldown:
29+
default-days: 7

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ jobs:
4444
if: always()
4545
with:
4646
token: ${{ secrets.CODECOV_ORG_TOKEN }}
47-
file: ./coverage.xml
47+
files: ./coverage.xml
4848
flags: Python_${{ steps.python-install.outputs.python-version }}

.github/workflows/lint.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ name: Lint
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions: {}
6+
57
env:
68
FORCE_COLOR: 1
79

8-
permissions:
9-
contents: read
10-
1110
jobs:
1211
lint:
1312
runs-on: ubuntu-latest
@@ -16,7 +15,4 @@ jobs:
1615
- uses: actions/checkout@v6
1716
with:
1817
persist-credentials: false
19-
- uses: actions/setup-python@v6
20-
with:
21-
python-version: "3.x"
22-
- uses: tox-dev/action-pre-commit-uv@v1
18+
- uses: j178/prek-action@v1

.github/zizmor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# https://docs.zizmor.sh/configuration/
2+
rules:
3+
unpinned-uses:
4+
config:
5+
policies:
6+
"*": ref-pin

.pre-commit-config.yaml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,50 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 23.9.1
2+
- repo: https://github.com/psf/black-pre-commit-mirror
3+
rev: 25.12.0
44
hooks:
55
- id: black
66

77
- repo: https://github.com/PyCQA/isort
8-
rev: 5.12.0
8+
rev: 7.0.0
99
hooks:
1010
- id: isort
1111
files: \.py$
1212

1313
- repo: https://github.com/pre-commit/pre-commit-hooks
14-
rev: v4.5.0
14+
rev: v6.0.0
1515
hooks:
1616
- id: check-builtin-literals
1717
- id: check-added-large-files
1818
- id: check-case-conflict
19-
- id: check-toml
2019
- id: check-yaml
2120
- id: debug-statements
2221
- id: end-of-file-fixer
23-
- id: forbid-new-submodules
22+
- id: forbid-submodules
23+
- id: requirements-txt-fixer
2424
- id: trailing-whitespace
25+
26+
- repo: https://github.com/python-jsonschema/check-jsonschema
27+
rev: 0.36.0
28+
hooks:
29+
- id: check-dependabot
30+
- id: check-github-workflows
31+
32+
- repo: https://github.com/rhysd/actionlint
33+
rev: v1.7.10
34+
hooks:
35+
- id: actionlint
36+
37+
- repo: https://github.com/woodruffw/zizmor-pre-commit
38+
rev: v1.19.0
39+
hooks:
40+
- id: zizmor
41+
42+
- repo: https://github.com/tox-dev/tox-ini-fmt
43+
rev: 1.7.1
44+
hooks:
45+
- id: tox-ini-fmt
46+
47+
- repo: meta
48+
hooks:
49+
- id: check-hooks-apply
50+
- id: check-useless-excludes

bedevere/backport.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Automatically remove a backport label, and check backport PR validity."""
2+
23
import functools
34
import re
45

bedevere/close_pr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Automatically close PR that tries to merge maintenance branch into main."""
2+
23
import re
34

45
import gidgethub.routing

bedevere/filepaths.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Checks related to filepaths on a pull request."""
2+
23
import gidgethub.routing
34

45
from . import news, prtype, util

bedevere/gh_issue.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Check if a GitHub issue number is specified in the pull request's title."""
2+
23
import re
34
from typing import Literal
45

bedevere/news.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Check for a news entry."""
2+
23
import functools
34
import pathlib
45
import re

0 commit comments

Comments
 (0)