Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0a9f810b
Commit
0a9f810b
authored
Jul 16, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
ac23a66a
b9ec2970
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
danger/commit_messages/Dangerfile
danger/commit_messages/Dangerfile
+13
-10
No files found.
danger/commit_messages/Dangerfile
View file @
0a9f810b
...
...
@@ -88,6 +88,19 @@ def lint_commit(commit) # rubocop:disable Metrics/AbcSize
# We ignore revert commits as they are well structured by Git already
return
false
if
commit
.
message
.
start_with?
(
'Revert "'
)
# Fail if a suggestion commit is used and squash is not enabled
if
commit
.
message
.
start_with?
(
'Apply suggestion to'
)
if
gitlab
.
mr_json
[
'squash'
]
return
false
else
fail_commit
(
commit
,
'If you are applying suggestions, enable squash in the merge request and re-run the failed job'
)
return
true
end
end
failures
=
false
subject
,
separator
,
details
=
commit
.
message
.
split
(
"
\n
"
,
3
)
...
...
@@ -114,16 +127,6 @@ def lint_commit(commit) # rubocop:disable Metrics/AbcSize
)
end
# Fail if a suggestion commit is used and squash is not enabled
if
commit
.
message
.
start_with?
(
'Apply suggestion to'
)
&&
!
gitlab
.
mr_json
[
'squash'
]
fail_commit
(
commit
,
'If you are applying suggestions, squash needs to be enabled in the merge request'
)
failures
=
true
end
unless
subject_starts_with_capital?
(
subject
)
fail_commit
(
commit
,
'The commit subject must start with a capital letter'
)
failures
=
true
...
...
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