diff --git a/tests/unit/framework/test_commit_lint.py b/tests/unit/framework/test_commit_lint.py index 869c7103..4125a203 100644 --- a/tests/unit/framework/test_commit_lint.py +++ b/tests/unit/framework/test_commit_lint.py @@ -52,6 +52,7 @@ def test_real_subjects_from_the_history(self, subject): "Merge branch 'main' into feat/x", 'Revert "feat(photos): something"', "fixup! fix(core): something", + "amend! fix(core): something", ]) def test_git_writes_these_itself(self, subject): """Linting them teaches people to pass --no-verify, nothing else.""" diff --git a/tools/commit-lint b/tools/commit-lint index f72a9fd6..8fb9f7c8 100755 --- a/tools/commit-lint +++ b/tools/commit-lint @@ -93,7 +93,7 @@ HEADER = re.compile( # Git writes these itself, or they are machine-made and never reach a # changelog. Linting them would only teach people to pass --no-verify. -EXEMPT = re.compile(r"^(Merge |Revert \"|fixup! |squash! |Bumps )") +EXEMPT = re.compile(r"^(Merge |Revert \"|fixup! |squash! |amend! |Bumps )") def check(header: str) -> list[str]: