gitlab-dangerfiles 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/danger/rules/commit_messages/Dangerfile +3 -4
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea2d871bd7f9bcfe97b5229b988c399738ccae1230be2ef32ceec69f7b4d5233
|
4
|
+
data.tar.gz: b895893d467f02be866c8d5ef2f3377aece5d9c705c5ba234017484a25b957e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 496a766fea976ba5fa69dd355825fee1203b65d9f11f2505be7940ae97fed1026e3c7e6846df97c44f899a8a6359f2b5df532ff4790a5a52acda6b5e87621268
|
7
|
+
data.tar.gz: e1401aa5f69f5f793f565ddb3aa2ee6fb9da77188fdbcc77b3795beaecbfffb6a1f8956136253f4e15ca213e5188732b0a46943586936393c6e2ab1223f5ac45
|
@@ -6,6 +6,7 @@ require_relative "../../../gitlab/dangerfiles/merge_request_linter"
|
|
6
6
|
COMMIT_MESSAGE_GUIDELINES = "https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#commit-messages-guidelines"
|
7
7
|
MORE_INFO = "For more information, take a look at our [Commit message guidelines](#{COMMIT_MESSAGE_GUIDELINES})."
|
8
8
|
THE_DANGER_JOB_TEXT = "the `%<job_name>` job"
|
9
|
+
MAX_COMMITS_COUNT = helper.config.max_commits_count
|
9
10
|
MAX_COMMITS_COUNT_EXCEEDED_MESSAGE = <<~MSG
|
10
11
|
This merge request includes more than %<max_commits_count>d commits. Each commit should meet the following criteria:
|
11
12
|
|
@@ -17,8 +18,6 @@ This merge request includes more than %<max_commits_count>d commits. Each commit
|
|
17
18
|
If this merge request contains commits that do not meet this criteria and/or contains intermediate work, please rebase these commits into a smaller number of commits or split this merge request into multiple smaller merge requests.
|
18
19
|
MSG
|
19
20
|
|
20
|
-
max_commits_count = helper.config.max_commits_count
|
21
|
-
|
22
21
|
def fail_commit(commit, message, more_info: true)
|
23
22
|
self.fail(build_message(commit, message, more_info: more_info))
|
24
23
|
end
|
@@ -104,8 +103,8 @@ def lint_commits(commits)
|
|
104
103
|
end
|
105
104
|
end
|
106
105
|
else
|
107
|
-
if count_non_fixup_commits(commit_linters) >
|
108
|
-
self.warn(format(MAX_COMMITS_COUNT_EXCEEDED_MESSAGE, max_commits_count:
|
106
|
+
if count_non_fixup_commits(commit_linters) > MAX_COMMITS_COUNT
|
107
|
+
self.warn(format(MAX_COMMITS_COUNT_EXCEEDED_MESSAGE, max_commits_count: MAX_COMMITS_COUNT))
|
109
108
|
end
|
110
109
|
end
|
111
110
|
|