forked from packit/packit-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
90 lines (89 loc) · 3.52 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# HOWTO: https://pre-commit.com/#usage
# pip3 install pre-commit
# pre-commit install -t pre-commit -t pre-push
repos:
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
exclude: tests_openshift/openshift_integration/test_data/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: detect-private-key
exclude: tests/conftest.py
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
args:
- --max-line-length=100
- --per-file-ignores=files/packit.wsgi:F401,E402
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
additional_dependencies:
[
types-jwt,
types-pkg_resources,
types-redis,
types-requests,
types-Flask,
types-PyYAML,
]
- repo: https://github.com/packit/pre-commit-hooks
rev: 8db5a24e01b9f54aaa7a800f33c4b9aa619af1b9
hooks:
- id: check-rebase
args:
- https://github.com/packit/packit-service.git
stages: [manual, push]
- repo: https://github.com/packit/requre
rev: 0.8.2
hooks:
- id: requre-purge
name: Requre response files cleanup
description: Replace the sensitive/time-based values in the requre response files
entry: >
requre-patch purge
--replaces 'requests.sessions%send:Date:str:Fri, 01 Nov 2019 13-36-03 GMT'
--replaces 'requests.sessions%send:ETag:str:W/"1e51b8e1c48787a433405211e9e0fe61"'
--replaces 'requests.sessions%send:X-Fedora-RequestID:str:XcFVKMi@EiqyqRlV7q32fgBBBkM'
--replaces 'requests.sessions%send:X-RateLimit-Remaining:str:4972'
--replaces 'requests.sessions%send:X-RateLimit-Reset:str:1572953901'
--replaces 'requests.sessions%send:X-GitHub-Request-Id:str:18FB:AA1A:99616C4:B8092CB:5CC15425'
--replaces 'requests.sessions%send:AppTime:str:D=4081'
--replaces 'requests.sessions%send:X-Fedora-AppServer:str:koji01.phx2.fedoraproject.org'
--replaces 'requests.sessions%send:X-Fedora-ProxyServer:str:proxy01.phx2.fedoraproject.org'
--replaces "requests.sessions%send:Content-Security-Policy:str:default-src 'self';script-src 'self' 'nonce-YqLDC0BS8d7iY8mKO7VtBbIne' https://apps.fedoraproject.org; style-src 'self' 'nonce-YqLDC0BS8d7iY8mKO7VtBbIne'; object-src 'none';base-uri 'self';img-src 'self' https:;"
--replaces "requests.sessions%_content:expires_at:str:2019-11-01T14:35:53Z"
--replaces "requests.sessions%send:elapsed:float:0.2"
--replaces "requests.sessions%_content:token:str:v1.1cd89d399b8c70f8b88e22cbdaa72abbe5e390db"
language: python
types: [yaml]
files: /tests_openshift.*\.yaml$
stages: [manual, push]