# 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-check
repos:
- repo: https://github.com/sbrunner/hooks
rev: <version> # 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==<version>
# Do Poetry lock
- id: poetry-lock
additional_dependencies:
- poetry==<version>
# Do Pipfile lock
- id: pipenv-lock
additional_dependencies:
- pipenv==<version>
# 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<year>[0-9]{4})"))'
two_date_re: ' Copyright \\(c\\) (?P<from>[0-9]{4})-(?P<to>[0-9]{4})")'
one_date_format: ' Copyright (c) {year}")'
two_date_format: ' Copyright (c) {from}-{to}")'
license_file: LICENSE
one_date_re: ' Copyright \(c\) (?P<year>[0-9]{4})'
two_date_re: ' Copyright \(c\) (?P<from>[0-9]{4})-(?P<to>[0-9]{4})'
one_date_format: ' Copyright (c) {year}'
two_date_format: ' Copyright (c) {from}-{to}'
license_file: LICENSE
```
Raw data
{
"_id": null,
"home_page": "https://github.com/sbrunner/hooks",
"name": "sbrunner-hooks",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "pre-commit",
"author": "St\u00e9phane Brunner",
"author_email": "stephane.brunner@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e9/02/96996fe752a8da7c83369a41fdd2dcbeb19396d51b4c4e7645673b81e948/sbrunner_hooks-1.0.0.tar.gz",
"platform": null,
"description": "# Pre commit hooks\n\n[pre-commit](https://pre-commit.com/) hook used to...\n\nCheck if the copyright is up to date (using the Git history).\n\n## Adding to your `.pre-commit-config.yaml`\n\n```yaml\nci:\n skip:\n # Skip the copyright check on pre-commit.ci because we don't have the Git history\n - copyright\n - copyright-required\n # Poetry didn't works with Python 3.11\n - poetry-lock\n - poetry-check\n\nrepos:\n - repo: https://github.com/sbrunner/hooks\n rev: <version> # Use the ref you want to point at\n hooks:\n # Check that the copyright is up to date\n - id: copyright\n # Check that the copyright is present and up to date\n - id: copyright-required\n # Require a timeout in GitHub workflow files\n - id: workflows-require-timeout\n # Check Poetry config\n - id: poetry-check\n additional_dependencies:\n - poetry==<version>\n # Do Poetry lock\n - id: poetry-lock\n additional_dependencies:\n - poetry==<version>\n # Do Pipfile lock\n - id: pipenv-lock\n additional_dependencies:\n - pipenv==<version>\n # Do Helm lock (helm should be installed)\n - id: helm-lock\n - id: npm-lock\n```\n\n## Copyright configuration\n\nThe default values used in the `.github/copyright.yaml` file.\n\nDefault values:\n\n```yaml\none_date_re: ' Copyright \\\\(c\\\\) (?P<year>[0-9]{4})\"))'\ntwo_date_re: ' Copyright \\\\(c\\\\) (?P<from>[0-9]{4})-(?P<to>[0-9]{4})\")'\none_date_format: ' Copyright (c) {year}\")'\ntwo_date_format: ' Copyright (c) {from}-{to}\")'\nlicense_file: LICENSE\n\none_date_re: ' Copyright \\(c\\) (?P<year>[0-9]{4})'\ntwo_date_re: ' Copyright \\(c\\) (?P<from>[0-9]{4})-(?P<to>[0-9]{4})'\none_date_format: ' Copyright (c) {year}'\ntwo_date_format: ' Copyright (c) {from}-{to}'\nlicense_file: LICENSE\n```\n\n",
"bugtrack_url": null,
"license": "BSD-2-Clause",
"summary": "Pre commit hook by sbrunner",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/sbrunner/hooks",
"Repository": "https://github.com/sbrunner/hooks"
},
"split_keywords": [
"pre-commit"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3b8f9be58afc5645844fc97d0a9c43832a5b78f1a3a0a9d55887ff4e22cb3640",
"md5": "ab298738beb795f4af2ed0bde4d7e906",
"sha256": "2a7b81106caa48e0b5824fec758b7521e24e12022beae911a4af3e8a12808502"
},
"downloads": -1,
"filename": "sbrunner_hooks-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ab298738beb795f4af2ed0bde4d7e906",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6483,
"upload_time": "2024-03-14T16:15:07",
"upload_time_iso_8601": "2024-03-14T16:15:07.062416Z",
"url": "https://files.pythonhosted.org/packages/3b/8f/9be58afc5645844fc97d0a9c43832a5b78f1a3a0a9d55887ff4e22cb3640/sbrunner_hooks-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e90296996fe752a8da7c83369a41fdd2dcbeb19396d51b4c4e7645673b81e948",
"md5": "a650f4d8d90ac364a70751ff592ca80e",
"sha256": "9cc7113c48d59e8ea99e44851e854688b2fdb95d97ca6f3c86d8502fff5a31d0"
},
"downloads": -1,
"filename": "sbrunner_hooks-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "a650f4d8d90ac364a70751ff592ca80e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 5165,
"upload_time": "2024-03-14T16:15:08",
"upload_time_iso_8601": "2024-03-14T16:15:08.889768Z",
"url": "https://files.pythonhosted.org/packages/e9/02/96996fe752a8da7c83369a41fdd2dcbeb19396d51b4c4e7645673b81e948/sbrunner_hooks-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-14 16:15:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sbrunner",
"github_project": "hooks",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sbrunner-hooks"
}