gitlab-dangerfiles 3.5.1 → 3.5.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/plugins/roulette.rb +12 -2
- data/lib/gitlab/dangerfiles/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7263e8c2ab6ba97b10b3cddc96ff91061cd526aa90992a7bd2df469b37e5e217
|
4
|
+
data.tar.gz: e9b2cabb3d6819af138c2080dbca5658f404e6d7f8a71e7f51944bc32e350fde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e28612c099a81ec122a31d475880f121833741375bab94004ee647cb6ae467b074b53c07156ad4a25f361b72e9cfc54bc157b8f64ac8cc42ce4ac0b631efa229
|
7
|
+
data.tar.gz: a37e350cfc9bcb13277801fa72a9a7c5a92028004e02293c34a0c69b03e3d51d6a8359480bb9a716fc5ac27f2b17ae6375dcfe239217f66eab14411949f50c0c
|
@@ -105,14 +105,24 @@ module Danger
|
|
105
105
|
|
106
106
|
required_approval_rules = unique_approval_rules(approval_rules)
|
107
107
|
required_approval_rules.filter_map do |rule|
|
108
|
-
rule
|
109
|
-
rule["approvals_required"] > 0 &&
|
108
|
+
spin_for_approval_rule?(rule) &&
|
110
109
|
Approval.from_approval_rule(rule, spin_for_approver(rule))
|
111
110
|
end
|
112
111
|
end
|
113
112
|
|
114
113
|
private
|
115
114
|
|
115
|
+
def spin_for_approval_rule?(rule)
|
116
|
+
rule["rule_type"] == "code_owner" &&
|
117
|
+
rule["approvals_required"] > 0 &&
|
118
|
+
# Exclude generic codeowners rule, which should be covered by others already
|
119
|
+
!generic_codeowners_rule?(rule)
|
120
|
+
end
|
121
|
+
|
122
|
+
def generic_codeowners_rule?(rule)
|
123
|
+
rule["section"] == "codeowners" && rule["name"] == "*"
|
124
|
+
end
|
125
|
+
|
116
126
|
# Returns an array containing all unique approval rules, based on on the section and eligible_approvers of the rules
|
117
127
|
#
|
118
128
|
# @param [Array<Hash>] approval rules
|
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: 3.5.
|
4
|
+
version: 3.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08
|
11
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|