Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
0dc0c93a
Commit
0dc0c93a
authored
5 years ago
by
Auke Klazema
Browse files
Options
Downloads
Patches
Plain Diff
SW-773
: Fix commit-msg hook for real
parent
56e189f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
support/hooks/commit-msg
+1
-1
1 addition, 1 deletion
support/hooks/commit-msg
with
1 addition
and
1 deletion
support/hooks/commit-msg
+
1
−
1
View file @
0dc0c93a
...
...
@@ -4,7 +4,7 @@ message_file = ARGV[0]
message
=
File
.
read
(
message_file
)
$regex
=
/^((fixes|task|story|issue)\s)?(#(\d+)|[a-zA-Z]+-(\d)+):/i
if
!
$regex
.
match
(
message
)
STDERR
.
puts
(
"[commit-msg hook] Your commit
#{
rev
}
was rejected!
\n
"
\
STDERR
.
puts
(
"[commit-msg hook] Your commit was rejected!
\n
"
\
"[commit-msg hook] A commit message must start with a JIRA task ID,
\n
"
\
" or
\"
task
\"
,
\"
story
\"
,
\"
issue
\"
or
\"
fixes
\"
, followed by an issue ID.
\n
"
\
"[commit-msg hook] For example:
\"
Task #42: Fixed bug
\"
or
\"
SW-22334: Fixed bug
\"\n
"
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment