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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
f10c8481
Commit
f10c8481
authored
Jun 19, 2019
by
Achilleas Pipinellis
Committed by
Lin Jen-Shin
Jun 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When using suggestions, squash must be enabled
parent
30c447f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
danger/commit_messages/Dangerfile
danger/commit_messages/Dangerfile
+11
-1
No files found.
danger/commit_messages/Dangerfile
View file @
f10c8481
...
...
@@ -80,7 +80,7 @@ def unicode_emoji_regex
))x
end
def
lint_commit
(
commit
)
def
lint_commit
(
commit
)
# rubocop:disable Metrics/AbcSize
# For now we'll ignore merge commits, as getting rid of those is a problem
# separate from enforcing good commit messages.
return
false
if
commit
.
message
.
start_with?
(
'Merge branch'
)
...
...
@@ -114,6 +114,16 @@ def lint_commit(commit)
)
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