mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
add support for post-commit
This commit is contained in:
parent
3b3b33ea29
commit
26adf1d560
7 changed files with 42 additions and 6 deletions
|
|
@ -150,6 +150,7 @@ def _pre_push_ns(
|
|||
_EXPECTED_ARG_LENGTH_BY_HOOK = {
|
||||
'commit-msg': 1,
|
||||
'post-checkout': 3,
|
||||
'post-commit': 0,
|
||||
'pre-commit': 0,
|
||||
'pre-merge-commit': 0,
|
||||
'pre-push': 2,
|
||||
|
|
@ -186,7 +187,7 @@ def _run_ns(
|
|||
return _pre_push_ns(color, args, stdin)
|
||||
elif hook_type in {'commit-msg', 'prepare-commit-msg'}:
|
||||
return _ns(hook_type, color, commit_msg_filename=args[0])
|
||||
elif hook_type in {'pre-merge-commit', 'pre-commit'}:
|
||||
elif hook_type in {'post-commit', 'pre-merge-commit', 'pre-commit'}:
|
||||
return _ns(hook_type, color)
|
||||
elif hook_type == 'post-checkout':
|
||||
return _ns(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue