Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
2b460bb7
by lovetox at 2022-05-19T21:24:02+02:00
1 changed file:
Changes:
| ... | ... | @@ -18,14 +18,15 @@ ALLOWED_TAGS = [ |
| 18 | 18 | 'chore',
|
| 19 | 19 | 'release',
|
| 20 | 20 | 'other',
|
| 21 | + 'imprv',
|
|
| 21 | 22 | ]
|
| 22 | 23 | |
| 23 | 24 | |
| 24 | - |
|
| 25 | -def parse_args() -> Tuple[str, str]:
|
|
| 25 | +def parse_args() -> Tuple[str, str, str]:
|
|
| 26 | + ref_name = sys.argv[1]
|
|
| 26 | 27 | old_ref = sys.argv[2]
|
| 27 | 28 | new_ref = sys.argv[3]
|
| 28 | - return old_ref, new_ref
|
|
| 29 | + return ref_name, old_ref, new_ref
|
|
| 29 | 30 | |
| 30 | 31 | |
| 31 | 32 | def get_commit_subject(sha: str) -> str:
|
| ... | ... | @@ -64,8 +65,12 @@ def enforce_message_rules(subject: str) -> None: |
| 64 | 65 | sys.exit(1)
|
| 65 | 66 | |
| 66 | 67 | |
| 67 | -def main(args: Tuple[str, str]) -> None:
|
|
| 68 | - shas = get_commit_shas(*args)
|
|
| 68 | +def main(args: Tuple[str, str, str]) -> None:
|
|
| 69 | + ref_name, old_ref, new_ref = args
|
|
| 70 | + if 'refs/tags' in ref_name:
|
|
| 71 | + return
|
|
| 72 | + |
|
| 73 | + shas = get_commit_shas(old_ref, new_ref)
|
|
| 69 | 74 | for sha in shas:
|
| 70 | 75 | subject = get_commit_subject(sha)
|
| 71 | 76 | enforce_message_rules(subject)
|