https://github.com/rafsaf/pyproject-tag-check
pre-commit hook to check poetry version in pyproject.toml was used as tag on github
https://github.com/rafsaf/pyproject-tag-check
pre-commit pre-commit-hook python release-automation
Last synced: 4 months ago
JSON representation
pre-commit hook to check poetry version in pyproject.toml was used as tag on github
- Host: GitHub
- URL: https://github.com/rafsaf/pyproject-tag-check
- Owner: rafsaf
- License: mit
- Created: 2022-11-26T00:37:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-13T18:46:43.000Z (over 1 year ago)
- Last Synced: 2025-11-21T18:10:30.362Z (7 months ago)
- Topics: pre-commit, pre-commit-hook, python, release-automation
- Language: Python
- Homepage: https://pypi.org/project/pyproject-tag-check/
- Size: 111 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## pyproject-tag-check
I always forget to bump poetry version in pyproject.toml files. That's why I build this simple package. It is pre-commit hook which check that version in pyproject.toml is not used as a tag for given repo URL (must be public repository).
## Usage:
Put it in `.pre-commit.config.yaml` repos and argument must be URL to public repo on GH (for example this repo itself https://github.com/rafsaf/pyproject-tag-check).
```yml
repos:
- repo: https://github.com/rafsaf/pyproject-tag-check
rev: "1.0.0"
hooks:
- id: pyproject-tag-check
always_run: true
args:
- https://github.com/rafsaf/pyproject-tag-check
```
Use `always_run: true` if check should be performed always, otherwise it will run only when `pyproject.toml` is changed.
`pyproject.toml` usually looks like
```toml
[tool.poetry]
name = "some-name..."
version = "0.1.0"
```
If repository is public and tag 0.1.0 already exists like it does for https://github.com/rafsaf/pyproject-tag-check, the check will not pass.