mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
Adds support for prepare-commit-msg hooks
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
This commit is contained in:
parent
809b7482df
commit
e60f541559
7 changed files with 142 additions and 6 deletions
|
|
@ -161,6 +161,7 @@ def _pre_push(stdin):
|
|||
|
||||
def _opts(stdin):
|
||||
fns = {
|
||||
'prepare-commit-msg': lambda _: ('--commit-msg-filename', sys.argv[1]),
|
||||
'commit-msg': lambda _: ('--commit-msg-filename', sys.argv[1]),
|
||||
'pre-commit': lambda _: (),
|
||||
'pre-push': _pre_push,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue