https://github.com/sbrunner/hooks
https://github.com/sbrunner/hooks
pre-commit pre-commit-hook
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sbrunner/hooks
- Owner: sbrunner
- License: bsd-2-clause
- Created: 2023-01-09T19:54:22.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-06-19T01:05:18.000Z (17 days ago)
- Last Synced: 2025-06-19T02:19:40.299Z (17 days ago)
- Topics: pre-commit, pre-commit-hook
- Language: Python
- Homepage:
- Size: 587 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pre commit hooks
[pre-commit](https://pre-commit.com/) hook used to...
Check if the copyright is up to date (using the Git history).
## Adding to your `.pre-commit-config.yaml`
```yaml
ci:
skip:
# Skip the copyright check on pre-commit.ci because we don't have the Git history
- copyright
- copyright-required
# Poetry didn't works with Python 3.11
- poetry-lock
- poetry-checkrepos:
- repo: https://github.com/sbrunner/hooks
rev: # Use the ref you want to point at
hooks:
# Check that the copyright is up to date
- id: copyright
# Check that the copyright is present and up to date
- id: copyright-required
# Require a timeout in GitHub workflow files
- id: workflows-require-timeout
# Check Poetry config
- id: poetry-check
additional_dependencies:
- poetry==
# Do Poetry lock
- id: poetry-lock
additional_dependencies:
- poetry==
# Do Pipfile lock
- id: pipenv-lock
additional_dependencies:
- pipenv==
# Do Helm lock (helm should be installed)
- id: helm-lock
- id: npm-lock
```## Copyright configuration
The default values used in the `.github/copyright.yaml` file.
Default values:
```yaml
one_date_re: ' Copyright \\(c\\) (?P[0-9]{4})"))'
two_date_re: ' Copyright \\(c\\) (?P[0-9]{4})-(?P[0-9]{4})")'
one_date_format: ' Copyright (c) {year}")'
two_date_format: ' Copyright (c) {from}-{to}")'
license_file: LICENSEone_date_re: ' Copyright \(c\) (?P[0-9]{4})'
two_date_re: ' Copyright \(c\) (?P[0-9]{4})-(?P[0-9]{4})'
one_date_format: ' Copyright (c) {year}'
two_date_format: ' Copyright (c) {from}-{to}'
license_file: LICENSE
```