{"id":23843,"library":"hatch-regex-commit","title":"hatch-regex-commit","description":"A Hatch plugin that automatically creates a Git commit and tag when bumping the project version using the `hatch version` command. It uses a regex to determine the version string. Version 0.0.4, last released in December 2021; the project appears to be in maintenance mode with no recent updates.","status":"maintenance","version":"0.0.4","language":"python","source_language":"en","source_url":"https://github.com/frankie567/hatch-regex-commit","tags":["hatch","plugin","version","git","commit","tag"],"install":[{"cmd":"pip install hatch-regex-commit","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required plugin host; must be installed separately (version >=1.0.0)","package":"hatch","optional":false},{"reason":"Requires git to be installed and available in PATH","package":"Git","optional":false}],"imports":[{"note":"Plugin class for internal use; normally not imported directly","symbol":"HatchRegexCommitPlugin","correct":"from hatch_regex_commit.plugin import HatchRegexCommitPlugin"}],"quickstart":{"code":"# pyproject.toml\n[build-system]\nrequires = [\"hatchling\", \"hatch-regex-commit\"]\nbuild-backend = \"hatchling.build\"\n\n[tool.hatch.envs.default]\n\n[tool.hatch.version]\nsource = \"regex\"\npath = \"src/my_package/__init__.py\"\npattern = \"__version__ = ['\\\"](?P<version>[^'\\\"]+)['\\\"]\"\n\n# Run: hatch version patch\n# This will bump the version, commit, and tag.","lang":"python","description":"Configure hatch-regex-commit in pyproject.toml and use `hatch version <bump>` to commit and tag automatically."},"warnings":[{"fix":"Upgrade Hatch to >=1.0.0 with `pip install --upgrade hatch`.","message":"This plugin requires Hatch >=1.0.0. Older Hatch versions (pre-1.0) have a different plugin API and will not work.","severity":"breaking","affected_versions":"hatch <1.0.0"},{"fix":"Ensure your pattern includes `(?P<version>...)` exactly as shown in the quickstart.","message":"The regex pattern MUST contain a named group `(?P<version>...)`; otherwise, the plugin will fail to extract the version.","severity":"gotcha","affected_versions":"all"},{"fix":"Always ensure your working tree is clean or use `git stash` before bumping.","message":"The plugin automatically commits and tags. It does not ask for confirmation. Running `hatch version` in a dirty working tree will commit all staged and unstaged changes.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Check that the `pattern` in pyproject.toml includes `(?P<version>...)` and that the `path` points to the correct file.","cause":"The regex pattern did not have a named group `version` or the file path is incorrect.","error":"TypeError: 'NoneType' object is not subscriptable"},{"fix":"Run `pip install hatch-regex-commit` and add `\"hatch-regex-commit\"` to the `requires` list under `[build-system]` in pyproject.toml.","cause":"The plugin is not installed or not in the build-system requires.","error":"ModuleNotFoundError: No module named 'hatch_regex_commit'"},{"fix":"Set git config user.name and user.email, or ensure the version file has been modified.","cause":"Git user name or email not configured, or there is nothing to commit.","error":"Git command failed: 'git commit' returned 1"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}