Improve pre-commit detection for changelog filenames
This commit is contained in:
parent
3dd2933dbd
commit
826adafe2e
|
@ -38,7 +38,8 @@ repos:
|
||||||
language: python
|
language: python
|
||||||
additional_dependencies: [pygments, restructuredtext_lint]
|
additional_dependencies: [pygments, restructuredtext_lint]
|
||||||
- id: changelogs-rst
|
- id: changelogs-rst
|
||||||
name: changelog files must end in .rst
|
name: changelog filenames
|
||||||
entry: ./scripts/fail
|
language: fail
|
||||||
language: script
|
entry: 'changelog files must be named ####.(feature|bugfix|doc|removal|vendor|trivial).rst'
|
||||||
files: 'changelog/.*(?<!\.rst)$'
|
exclude: changelog/(\d+\.(feature|bugfix|doc|removal|vendor|trivial).rst|README.rst|_template.rst)
|
||||||
|
files: ^changelog/
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Improve pre-commit detection for changelog filenames
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
"""Used by .pre-commit-config.yaml"""
|
|
||||||
import sys
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print(" ".join(sys.argv[1:]))
|
|
||||||
sys.exit(1)
|
|
4
tox.ini
4
tox.ini
|
@ -48,7 +48,7 @@ commands =
|
||||||
[testenv:linting]
|
[testenv:linting]
|
||||||
skip_install = True
|
skip_install = True
|
||||||
basepython = python3.6
|
basepython = python3.6
|
||||||
deps = pre-commit
|
deps = pre-commit>=1.11.0
|
||||||
commands = pre-commit run --all-files --show-diff-on-failure
|
commands = pre-commit run --all-files --show-diff-on-failure
|
||||||
|
|
||||||
[testenv:py27-xdist]
|
[testenv:py27-xdist]
|
||||||
|
@ -195,7 +195,7 @@ passenv = *
|
||||||
deps =
|
deps =
|
||||||
colorama
|
colorama
|
||||||
gitpython
|
gitpython
|
||||||
pre-commit
|
pre-commit>=1.11.0
|
||||||
towncrier
|
towncrier
|
||||||
wheel
|
wheel
|
||||||
commands = python scripts/release.py {posargs}
|
commands = python scripts/release.py {posargs}
|
||||||
|
|
Loading…
Reference in New Issue