mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 04:20:28 -06:00
Adds a prepare-commit-msg hook stage which allows for hooks which add dynamic suggested/placeholder text to commit messages that an author can use as a starting point for writing a commit message
27 lines
718 B
Python
27 lines
718 B
Python
from __future__ import absolute_import
|
|
from __future__ import unicode_literals
|
|
|
|
import importlib_metadata # TODO: importlib.metadata py38?
|
|
|
|
CONFIG_FILE = '.pre-commit-config.yaml'
|
|
MANIFEST_FILE = '.pre-commit-hooks.yaml'
|
|
|
|
YAML_DUMP_KWARGS = {
|
|
'default_flow_style': False,
|
|
# Use unicode
|
|
'encoding': None,
|
|
'indent': 4,
|
|
}
|
|
|
|
# Bump when installation changes in a backwards / forwards incompatible way
|
|
INSTALLED_STATE_VERSION = '1'
|
|
# Bump when modifying `empty_template`
|
|
LOCAL_REPO_VERSION = '1'
|
|
|
|
VERSION = importlib_metadata.version('pre_commit')
|
|
|
|
# `manual` is not invoked by any installed git hook. See #719
|
|
STAGES = ('commit', 'prepare-commit-msg', 'commit-msg', 'manual', 'push')
|
|
|
|
DEFAULT = 'default'
|