Merge pull request #3765 from asottile/require_changelog_rst

Enforce that changelog files are .rst
This commit is contained in:
Anthony Sottile 2018-08-01 23:47:09 -07:00 committed by GitHub
commit 4705fd2bbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -38,3 +38,8 @@ repos:
language: python
additional_dependencies: [pygments, restructuredtext_lint]
python_version: python3.6
- id: changelogs-rst
name: changelog files must end in .rst
entry: ./scripts/fail
language: script
files: 'changelog/.*(?<!\.rst)$'

7
scripts/fail Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env python
"""Used by .pre-commit-config.yaml"""
import sys
if __name__ == "__main__":
print(" ".join(sys.argv[1:]))
sys.exit(1)