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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e4bc738b166a81e3e3ebd009c67eb6205bd40155f624d62ee3b8b4e2a4c3203
4
- data.tar.gz: 7b0be83cf24f080a0d7d468db5656526de8a3937206624dcbba2cb59d44a5911
3
+ metadata.gz: ea2d871bd7f9bcfe97b5229b988c399738ccae1230be2ef32ceec69f7b4d5233
4
+ data.tar.gz: b895893d467f02be866c8d5ef2f3377aece5d9c705c5ba234017484a25b957e2
5
5
  SHA512:
6
- metadata.gz: bae09716c429d549b9624223997b20b3f0c75470aa72ccb6293f145b294bbbf97bd04c7e4ce0aeb791898b9eb3ba23f1b0d87b2e3b77d667d9c07de6f2d63749
7
- data.tar.gz: 2c2a4745c78288a38dec0e93f0193b5507b46680a7d029f34e1f8e90400e882ab17ef144d00f2085be06d91dbc4685df7d36af7af47bf029a94f38916f6c4586
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) > max_commits_count
108
- self.warn(format(MAX_COMMITS_COUNT_EXCEEDED_MESSAGE, max_commits_count: 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
 
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module Dangerfiles
3
- VERSION = "2.1.1"
3
+ VERSION = "2.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-dangerfiles
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab