Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gitHooks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
APP
gitHooks
Commits
70a1a1a2
Commit
70a1a1a2
authored
Jan 03, 2018
by
iOS-银 恭敬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字数限制
parent
51ceb8e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
CommitMsgStyle.py
gitHooks/CommitMsgStyle.py
+7
-0
No files found.
gitHooks/CommitMsgStyle.py
View file @
70a1a1a2
...
...
@@ -7,6 +7,8 @@ import subprocess
import
reviewboard
maxSubjectLen
=
50
leastSubjectLen
=
10
typesList
=
[
'feat'
,
'fix'
,
'docs'
,
'style'
,
'refactor'
,
'test'
,
'chore'
]
MERGE_BRANCH_TEXT
=
"Merge branch"
...
...
@@ -135,6 +137,11 @@ class CheckMsgStyle(object):
print
"你的subject是:
%
s"
%
subjectContent
reviewboard
.
reset_review_state
()
sys
.
exit
(
1
)
if
subjectLen
<
leastSubjectLen
:
print
"subject最少
%
s个字,你超出了
%
d个字"
%
(
leastSubjectLen
,
subjectLen
-
leastSubjectLen
)
print
"你的subject是:
%
s"
%
subjectContent
reviewboard
.
reset_review_state
()
sys
.
exit
(
1
)
#5 JIRA模糊匹配
blur
=
self
.
__check_is_blur_JIRAID
(
content
,
typeContent
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment