diff options
author | lovetox <philipp@hoerist.com> | 2022-03-27 19:37:17 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2022-03-27 19:38:14 +0300 |
commit | 40abcc5716d238235cf46d90ddffa9bbf68b0139 (patch) | |
tree | 30462924de03e976555d73610a1752fa81fe7022 /.githooks | |
parent | ba31782c7582fe67fb6c3db32ddc50fb7d7a3aac (diff) |
ci: Update git update hook
Diffstat (limited to '.githooks')
-rwxr-xr-x | .githooks/update | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/.githooks/update b/.githooks/update index 8be62f7ca..e274919ad 100755 --- a/.githooks/update +++ b/.githooks/update @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import annotations @@ -33,7 +33,12 @@ def get_commit_shas(start_ref: str, end_ref: str) -> List[str]: def enforce_message_rules(subject: str) -> None: - tag, subject = subject.split(': ', maxsplit=1) + try: + tag, subject = subject.split(': ', maxsplit=1) + except ValueError: + print('Unknown commit message tag:', subject) + sys.exit(1) + if tag not in ALLOWED_TAGS: print('Unknown commit message tag:', tag) sys.exit(1) |