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
f70681ce
Commit
f70681ce
authored
Nov 15, 2019
by
Elan Ruusamäe
Committed by
Lin Jen-Shin
Nov 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Danger: Skip counting fixup commits as quality of merge request
parent
dbd0a8b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
danger/commit_messages/Dangerfile
danger/commit_messages/Dangerfile
+7
-1
No files found.
danger/commit_messages/Dangerfile
View file @
f70681ce
...
...
@@ -86,6 +86,12 @@ def unicode_emoji_regex
))x
end
def
count_filtered_commits
(
commits
)
commits
.
count
do
|
commit
|
!
commit
.
message
.
start_with?
(
'fixup!'
,
'squash!'
)
end
end
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.
...
...
@@ -285,7 +291,7 @@ def lint_commits(commits)
end
end
if
git
.
commits
.
length
>
10
&&
!
ce_upstream?
if
count_filtered_commits
(
git
.
commits
)
>
10
&&
!
ce_upstream?
warn
(
'This merge request includes more than 10 commits. '
\
'Please rebase these commits into a smaller number of commits.'
...
...
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