confiner 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/confiner/plugins/gitlab.rb +7 -3
- data/lib/confiner/version.rb +5 -0
- data/lib/confiner.rb +0 -2
- metadata +17 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2aec5b597e2386e03ac5df865c2a0adc622a13ec580047e9a320a5ddf80d486b
|
|
4
|
+
data.tar.gz: 41d27a7ae0f3e5fb86a8d19d00593a043bd08eefb9d9304d531f4ab46e81c726
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a265ca1e725d8075bdd17dfb67ffb2e74fccc171581255b71789f6491e9da2cdb7ee0737073d7dbe3cf02dc9e0cbc85ae9f05538e7021ef5d8eb2ffef53e4961
|
|
7
|
+
data.tar.gz: 35ba5a29c7bed14503fb81db7d791b392167630fe7f8780eb8e93277e0a4dde156d8d358abc68dfe2910eb7ee12fb4338f91d7b627ea5c86f639a2d98c56131d
|
|
@@ -24,6 +24,8 @@ module Confiner
|
|
|
24
24
|
|
|
25
25
|
ENV['GITLAB_API_HTTPARTY_OPTIONS'] = ENV.fetch('GITLAB_API_HTTPARTY_OPTIONS') { "{read_timeout: #{timeout}}" }
|
|
26
26
|
|
|
27
|
+
raise ArgumentError, 'Missing private_token' if private_token.nil?
|
|
28
|
+
|
|
27
29
|
@gitlab_client = ::Gitlab.client(private_token: private_token, endpoint: endpoint)
|
|
28
30
|
end
|
|
29
31
|
|
|
@@ -184,7 +186,7 @@ module Confiner
|
|
|
184
186
|
# @param [Gitlab::ObjectifiedHash] failure_issue the existing failure issue
|
|
185
187
|
# @return [Gitlab::ObjectifiedHash] the new branch
|
|
186
188
|
def create_branch(failure_issue, example)
|
|
187
|
-
branch = @gitlab_client.create_branch(target_project, "#{failure_issue['iid']}-quarantine-#{example.name.
|
|
189
|
+
branch = @gitlab_client.create_branch(target_project, "#{failure_issue['iid']}-quarantine-#{example.name.gsub(/\W/, '-')}", ref)
|
|
188
190
|
|
|
189
191
|
log :branch, "Created branch #{branch['name']} (#{branch['web_url']})", 4
|
|
190
192
|
|
|
@@ -228,13 +230,15 @@ module Confiner
|
|
|
228
230
|
end
|
|
229
231
|
end
|
|
230
232
|
|
|
233
|
+
meets_or_exceeds_threshold = occurrences.size > threshold ? 'exceeds' : 'meets'
|
|
234
|
+
|
|
231
235
|
description = <<~MARKDOWN
|
|
232
236
|
## What does this MR do?
|
|
233
237
|
|
|
234
238
|
Quarantines the test `#{example.name}` (https://gitlab.com/#{target_project}/-/blob/#{ref}/#{example.file}#L#{changed_line_number})
|
|
235
239
|
|
|
236
|
-
This test has been found by [Confiner](https://gitlab.com/gitlab-org/quality/confiner) to have
|
|
237
|
-
|
|
240
|
+
This test has been found by [Confiner](https://gitlab.com/gitlab-org/quality/confiner) to have failed
|
|
241
|
+
#{occurrences.size} times, which #{meets_or_exceeds_threshold} the threshold of #{threshold} times.
|
|
238
242
|
|
|
239
243
|
#{markdown_occurrences.join("\n")}
|
|
240
244
|
|
data/lib/confiner.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: confiner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitLab Quality
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-03-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -24,6 +24,20 @@ dependencies:
|
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: 3.10.0
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rspec-parameterized
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 0.5.1
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: 0.5.1
|
|
27
41
|
- !ruby/object:Gem::Dependency
|
|
28
42
|
name: zeitwerk
|
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -68,6 +82,7 @@ files:
|
|
|
68
82
|
- lib/confiner/plugin.rb
|
|
69
83
|
- lib/confiner/plugins/debug.rb
|
|
70
84
|
- lib/confiner/plugins/gitlab.rb
|
|
85
|
+
- lib/confiner/version.rb
|
|
71
86
|
homepage: https://gitlab.com/gitlab-org/quality/confiner
|
|
72
87
|
licenses:
|
|
73
88
|
- MIT
|