diff --git a/.ci/scripts/validate_commit_message.py b/.ci/scripts/validate_commit_message.py index 13a0086f3..bce524ba7 100755 --- a/.ci/scripts/validate_commit_message.py +++ b/.ci/scripts/validate_commit_message.py @@ -24,7 +24,8 @@ r"^DO\s*NOT\s*MERGE", r"^EXPERIMENT", r"^FIXUP", - r"Apply suggestions from code review", + r"^fixup!", # This is created by 'git commit --fixup' + r"Apply suggestions from code review", # This usually comes from GitHub ] try: CHANGELOG_EXTS = [ @@ -40,7 +41,11 @@ if NOISSUE_MARKER in message: sys.exit(f"Do not add '{NOISSUE_MARKER}' in the commit message.") -if any((re.match(pattern, message, re.IGNORECASE) for pattern in BLOCKING_REGEX)): +blocking_matches = [m for m in (re.match(pattern, message) for pattern in BLOCKING_REGEX) if m] +if blocking_matches: + print("Found these phrases in the commit message:") + for m in blocking_matches: + print(" - " + m.group(0)) sys.exit("This PR is not ready for consumption.") g = Github(os.environ.get("GITHUB_TOKEN")) diff --git a/.github/template_gitref b/.github/template_gitref index bdfe03f31..4630e6c46 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-420-gf332a34 +2021.08.26-421-g204a709