gitlab-dangerfiles 2.1.2 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gitlab-dangerfiles.gemspec +2 -1
- data/lib/danger/plugins/helper.rb +1 -1
- data/lib/danger/plugins/roulette.rb +1 -1
- data/lib/danger/rules/commit_messages/Dangerfile +1 -1
- data/lib/gitlab/dangerfiles/commit_linter.rb +2 -1
- data/lib/gitlab/dangerfiles/spec_helper.rb +1 -1
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f81554a60bebe4dbb5cec0a4499df086b580778f5bd2d82a67613a9af166a78
|
4
|
+
data.tar.gz: 83c066d44caca9a1bf05386269f15d92b781891e90b1f3e709cf190faffbb773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9369900511e47644c72f843f52f8b212528f1604a50a07427cab956822974ea9b71f5051a4d8313cf962a7430b9ea150c0f3deeca3ed2360542729b1f79d279
|
7
|
+
data.tar.gz: 9d2cc70542f4df753a6d30d194a43c883a1960aefe517f0b1001609ec47cb764c9c90b7a166d633b7a50a4e49a046bc90cdb56b5c3ed0d02c052909458453d65
|
data/gitlab-dangerfiles.gemspec
CHANGED
@@ -27,7 +27,8 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_dependency "danger-gitlab"
|
30
|
+
spec.add_dependency "danger-gitlab", ">= 8.0.0"
|
31
|
+
spec.add_dependency "danger", ">= 8.3.1"
|
31
32
|
|
32
33
|
spec.add_development_dependency "rspec", "~> 3.0"
|
33
34
|
spec.add_development_dependency "rspec-parameterized"
|
@@ -416,7 +416,7 @@ module Danger
|
|
416
416
|
return nil unless ci?
|
417
417
|
return nil if defined?(@force_changes_from_git)
|
418
418
|
|
419
|
-
@changes_from_api ||= gitlab_helper.mr_changes
|
419
|
+
@changes_from_api ||= gitlab_helper.mr_changes
|
420
420
|
rescue
|
421
421
|
# Fallback to the Git strategy in any case
|
422
422
|
@force_changes_from_git = true
|
@@ -34,7 +34,7 @@ module Danger
|
|
34
34
|
#
|
35
35
|
# @return [Array<Spin>]
|
36
36
|
def spin(project, categories = [nil], timezone_experiment: false)
|
37
|
-
spins = categories.
|
37
|
+
spins = categories.sort_by(&:to_s).map do |category|
|
38
38
|
including_timezone = INCLUDE_TIMEZONE_FOR_CATEGORY.fetch(category, timezone_experiment)
|
39
39
|
|
40
40
|
spin_for_category(project, category, timezone_experiment: including_timezone)
|
@@ -5,7 +5,7 @@ require_relative "../../../gitlab/dangerfiles/merge_request_linter"
|
|
5
5
|
|
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
|
-
THE_DANGER_JOB_TEXT = "the `%<job_name
|
8
|
+
THE_DANGER_JOB_TEXT = "the `%<job_name>s` job"
|
9
9
|
MAX_COMMITS_COUNT = helper.config.max_commits_count
|
10
10
|
MAX_COMMITS_COUNT_EXCEEDED_MESSAGE = <<~MSG
|
11
11
|
This merge request includes more than %<max_commits_count>d commits. Each commit should meet the following criteria:
|
@@ -12,6 +12,7 @@ module Gitlab
|
|
12
12
|
SHORT_REFERENCE_REGEX = %r{([\w\-\/]+)?(?<!`)(#|!|&)\d+(?<!`)}.freeze
|
13
13
|
# Milestone
|
14
14
|
MS_SHORT_REFERENCE_REGEX = %r{([\w\-\/]+)?(?<!`)%"?\d{1,3}\.\d{1,3}"?(?<!`)}.freeze
|
15
|
+
SUGGESTIONS_APPLIED_COMMIT_REGEX = /Apply \d+ suggestion\(s\) to \d+ file\(s\)/.freeze
|
15
16
|
|
16
17
|
def self.problems_mapping
|
17
18
|
super.merge(
|
@@ -41,7 +42,7 @@ module Gitlab
|
|
41
42
|
end
|
42
43
|
|
43
44
|
def suggestion?
|
44
|
-
commit.message
|
45
|
+
SUGGESTIONS_APPLIED_COMMIT_REGEX.match?(commit.message)
|
45
46
|
end
|
46
47
|
|
47
48
|
def merge?
|
@@ -104,7 +104,7 @@ RSpec.shared_context "with dangerfile" do
|
|
104
104
|
end
|
105
105
|
|
106
106
|
let(:fake_git) { double("fake-git", added_files: added_files, modified_files: modified_files, deleted_files: deleted_files, renamed_files: renamed_files) }
|
107
|
-
let(:fake_helper) { double("fake-helper", changes: changes, mr_iid: 1234, mr_title: mr_title, mr_labels: mr_labels) }
|
107
|
+
let(:fake_helper) { double("fake-helper", changes: changes, added_files: added_files, modified_files: modified_files, deleted_files: deleted_files, renamed_files: renamed_files, mr_iid: 1234, mr_title: mr_title, mr_labels: mr_labels) }
|
108
108
|
|
109
109
|
before do
|
110
110
|
allow(dangerfile).to receive(:git).and_return(fake_git)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-dangerfiles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-gitlab
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 8.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 8.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: danger
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 8.3.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 8.3.1
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|