Skip to content

Commit cbbc1e4

Browse files
committed
remove ! as not in angular commit convention (NO_JIRA)
1 parent fb4f791 commit cbbc1e4

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

main/githooks.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,20 +897,21 @@ def _conventional_commits_enabled():
897897

898898
def check_conventional_commit(message):
899899
'''Check if the commit message follows the Angular Conventional Commits standard.'''
900-
# Angular Conventional Commits header: type(scope?)!?: subject
900+
# Angular Conventional Commits header: type(scope?): subject
901901
# Allowed types from @commitlint/config-angular:
902902
# build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
903+
# Note: Angular does not use the `!` breaking-change marker in the header;
903904
pattern = re.compile(
904905
r'^(BREAKING CHANGE|feat|fix|refactor|build|chore|ci|docs|perf|revert|style|test)' # type
905906
r'(\([\w\-\.\/]+\))?' # optional scope
906-
r'!?: ' # optional breaking change indicator and required ": "
907+
r': ' # required ": "
907908
r'.+' # subject
908909
)
909910
first_line = message.split('\n', 1)[0]
910911
if not pattern.match(first_line):
911912
_fail('Commit message does not follow the Angular Conventional '
912913
'Commits standard.\n'
913-
'Expected: <type>(<scope>)?!?: <subject>\n'
914+
'Expected: <type>(<scope>)?: <subject>\n'
914915
'See https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md')
915916
return 1
916917
return 0

0 commit comments

Comments
 (0)