Skip to content

Commit

Permalink
Merge pull request #3957 from asottile/changelog_files
Browse files Browse the repository at this point in the history
Improve pre-commit detection for changelog filenames
  • Loading branch information
asottile authored Sep 8, 2018
2 parents 3dd2933 + 826adaf commit 2c90b3d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ repos:
language: python
additional_dependencies: [pygments, restructuredtext_lint]
- id: changelogs-rst
name: changelog files must end in .rst
entry: ./scripts/fail
language: script
files: 'changelog/.*(?<!\.rst)$'
name: changelog filenames
language: fail
entry: 'changelog files must be named ####.(feature|bugfix|doc|removal|vendor|trivial).rst'
exclude: changelog/(\d+\.(feature|bugfix|doc|removal|vendor|trivial).rst|README.rst|_template.rst)
files: ^changelog/
1 change: 1 addition & 0 deletions changelog/3955.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve pre-commit detection for changelog filenames
7 changes: 0 additions & 7 deletions scripts/fail

This file was deleted.

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ commands =
[testenv:linting]
skip_install = True
basepython = python3.6
deps = pre-commit
deps = pre-commit>=1.11.0
commands = pre-commit run --all-files --show-diff-on-failure

[testenv:py27-xdist]
Expand Down Expand Up @@ -195,7 +195,7 @@ passenv = *
deps =
colorama
gitpython
pre-commit
pre-commit>=1.11.0
towncrier
wheel
commands = python scripts/release.py {posargs}
Expand Down

0 comments on commit 2c90b3d

Please sign in to comment.