gitlab-dangerfiles 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab/CODEOWNERS +1 -0
- data/.gitlab-ci.yml +6 -0
- data/Dangerfile +10 -0
- data/Gemfile +4 -0
- data/lib/danger/plugins/helper.rb +1 -0
- data/lib/danger/plugins/roulette.rb +3 -0
- data/lib/gitlab/dangerfiles/base_linter.rb +1 -1
- data/lib/gitlab/dangerfiles/teammate.rb +9 -1
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93e497ecb88959ef6d916e995491d4a17644b2875b765a87d1b8dbf2a2e245cd
|
4
|
+
data.tar.gz: 2060f3bb306e1abf440eb4d2eead9f4a97dd5999d28a691fe119260fcf338b45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01a447e73d6550265ddf775674190816341bd07f484be816b7583fc3b70427bcfb2b1a0c9aa86b651486bed62953a8e97838c58527eee11af4c169f2633d7d2f
|
7
|
+
data.tar.gz: f85733f1b015c3170cafc990b0cf84c773ed8532f11e3978b59d21477ad592d8095ff6b46b4a673da98f956c1368ed4a6501e3ae26b62c1d1c534022bbc4b88b
|
data/.gitlab/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @gl-quality/eng-prod
|
data/.gitlab-ci.yml
CHANGED
data/Dangerfile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require_relative "lib/gitlab-dangerfiles"
|
2
|
+
|
3
|
+
# Get an instance of Gitlab::Dangerfiles
|
4
|
+
gitlab_dangerfiles = Gitlab::Dangerfiles::Engine.new(self)
|
5
|
+
|
6
|
+
# Import all plugins from the gem
|
7
|
+
gitlab_dangerfiles.import_plugins
|
8
|
+
|
9
|
+
# Import all rules from the gem
|
10
|
+
gitlab_dangerfiles.import_dangerfiles
|
data/Gemfile
CHANGED
@@ -16,6 +16,7 @@ module Danger
|
|
16
16
|
docs: "~documentation", # Docs are reviewed along DevOps stages, so don't need roulette for now.
|
17
17
|
none: "",
|
18
18
|
qa: "~QA",
|
19
|
+
ux: "~UX",
|
19
20
|
test: "~test ~Quality for `spec/features/*`",
|
20
21
|
# Deprecated as of 2.3.0 in favor of tooling
|
21
22
|
engineering_productivity: '~"Engineering Productivity" for CI, Danger',
|
@@ -34,6 +34,9 @@ module Danger
|
|
34
34
|
#
|
35
35
|
# @return [Array<Spin>]
|
36
36
|
def spin(project, categories = [nil], timezone_experiment: false)
|
37
|
+
project = project.downcase
|
38
|
+
categories = categories.map { |category| category&.downcase }
|
39
|
+
|
37
40
|
spins = categories.sort_by(&:to_s).map do |category|
|
38
41
|
including_timezone = INCLUDE_TIMEZONE_FOR_CATEGORY.fetch(category, timezone_experiment)
|
39
42
|
|
@@ -82,7 +82,7 @@ module Gitlab
|
|
82
82
|
return false if subject.empty?
|
83
83
|
return false if ("A".."Z").cover?(subject[0])
|
84
84
|
|
85
|
-
first_char = subject.sub(/\A(\[
|
85
|
+
first_char = subject.sub(/\A(\[[^\]]+\]|[^:\s]+:)\s/, "")[0]
|
86
86
|
first_char_downcased = first_char.downcase
|
87
87
|
return true unless ("a".."z").cover?(first_char_downcased)
|
88
88
|
|
@@ -12,7 +12,7 @@ module Gitlab
|
|
12
12
|
@name = options["name"]
|
13
13
|
@markdown_name = options["markdown_name"]
|
14
14
|
@role = options["role"]
|
15
|
-
@projects = options["projects"]
|
15
|
+
@projects = process_projects(options["projects"])
|
16
16
|
@available = options["available"]
|
17
17
|
@hungry = options["hungry"]
|
18
18
|
@reduced_capacity = options["reduced_capacity"]
|
@@ -79,6 +79,14 @@ module Gitlab
|
|
79
79
|
|
80
80
|
private
|
81
81
|
|
82
|
+
def process_projects(projects)
|
83
|
+
return nil unless projects
|
84
|
+
|
85
|
+
projects.each_with_object({}) do |(project, capabilities), all|
|
86
|
+
all[project.downcase] = Array(capabilities).map(&:downcase)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
82
90
|
def utc_offset_text(author = nil)
|
83
91
|
offset_text = if floored_offset_hours >= 0
|
84
92
|
"UTC+#{floored_offset_hours}"
|
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.5.0
|
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-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-gitlab
|
@@ -131,10 +131,12 @@ extra_rdoc_files: []
|
|
131
131
|
files:
|
132
132
|
- ".gitignore"
|
133
133
|
- ".gitlab-ci.yml"
|
134
|
+
- ".gitlab/CODEOWNERS"
|
134
135
|
- ".gitlab/merge_request_templates/Release.md"
|
135
136
|
- ".rspec"
|
136
137
|
- ".yardopts"
|
137
138
|
- CODE_OF_CONDUCT.md
|
139
|
+
- Dangerfile
|
138
140
|
- Gemfile
|
139
141
|
- Guardfile
|
140
142
|
- LICENSE.txt
|