File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,15 @@ pre-commit install -t pre-commit -t commit-msg
167167With this command the library will take configuration from ` .pre-commit-config.yaml ` and will set up the hooks by us.
168168
169169
170+ ### Commit message style
171+ Use the following commit message style. e.g:
172+ ```
173+ 'feat: TT-123 Applying some changes'
174+ 'fix: TT-321 Fixing something broken'
175+ 'feat(config): TT-00 Fix something in config files'
176+ ```
177+ The value ` TT-### ` refers to the Jira issue that is being solved. Use TT-00 if the commit does not refer to any issue.
178+
170179### Test
171180We are using [ Pytest] ( https://docs.pytest.org/en/latest/index.html ) for tests. The tests are located in the package
172181` tests ` and use the [ conventions for python test discovery] ( https://docs.pytest.org/en/latest/goodpractices.html#test-discovery ) .
Original file line number Diff line number Diff line change 44ERROR_MSG = """
55Commit failed!
66Please use semantic commit message format. Examples:
7- 'feat: Applying some changes'
8- 'fix: Fixing something broken'
9- 'feat(config): Fix something in config files'
7+ 'feat: TT-123 Applying some changes'
8+ 'fix: TT-321 Fixing something broken'
9+ 'feat(config): TT-00 Fix something in config files'
1010
1111For more details in commit message format, review https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits
1212"""
1313
1414SUCCESS_MSG = "Commit succeed!. Semantic commit message is correct."
1515
16- COMMIT_MSG_REGEX = r'(TT-)[0-9].*( build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert)(\([\w\-]+\))?:\s .*'
16+ COMMIT_MSG_REGEX = r'(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert)(\([\w\-]+\))?: TT-[0-9]+ .*'
1717
1818# Get the commit message file
1919commit_msg_file = open (sys .argv [1 ]) # The first argument is the file
You can’t perform that action at this time.
0 commit comments