gitlab-qa 7.19.0 → 7.20.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7b10d593ddaeee4b4e931904d7332f845b1fb8f816e5e42d3c79e22634ff680
|
4
|
+
data.tar.gz: 93b081c8de2108f2b9f17462319b3ac5467671a3b775ab597fbe317b0f7646aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f590d463f6fea2e69dba2ad64ac15274011a63863db9c8d9544e24e07c91a683a92709b96f0628d114da4d825bc5a4e5104bdf9c6bbd57750ef2b3f20007ee8
|
7
|
+
data.tar.gz: 681dd9b8d51cc491a75a4beba08391ffecbb7ecef6218c9db51854d452e4a7a2bf9e9fe36e7e9603608be4d5468d6ecf0462951004eb1f68155715d2a9497216
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'erb'
|
4
|
+
|
3
5
|
module Gitlab
|
4
6
|
module QA
|
5
7
|
module Report
|
@@ -59,7 +61,28 @@ module Gitlab
|
|
59
61
|
end
|
60
62
|
|
61
63
|
def new_issue_description(test)
|
62
|
-
"#{super}#{
|
64
|
+
"#{super}\n\n#{execution_graph_section(test)}"
|
65
|
+
end
|
66
|
+
|
67
|
+
def execution_graph_section(test)
|
68
|
+
formatted_title = ERB::Util.url_encode(test.name)
|
69
|
+
|
70
|
+
<<~MKDOWN.strip
|
71
|
+
### Executions
|
72
|
+
|
73
|
+
package-and-qa:
|
74
|
+
<img src="https://dashboards.quality.gitlab.net/render/d-solo/cW0UMgv7k/spec-health?orgId=1&var-run_type=package-and-qa&var-name=#{formatted_title}&panelId=4&width=1000&height=500" />
|
75
|
+
MKDOWN
|
76
|
+
end
|
77
|
+
|
78
|
+
def updated_description(testcase, test)
|
79
|
+
historical_results_section = testcase.description.match(/### DO NOT EDIT BELOW THIS LINE[\s\S]+/)
|
80
|
+
|
81
|
+
"#{new_issue_description(test)}\n\n#{historical_results_section}"
|
82
|
+
end
|
83
|
+
|
84
|
+
def issue_title_needs_updating?(testcase, test)
|
85
|
+
super || !testcase.description.include?(execution_graph_section(test)) && !%w[canary production preprod release].include?(pipeline)
|
63
86
|
end
|
64
87
|
end
|
65
88
|
end
|
@@ -47,9 +47,14 @@ module Gitlab
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def update_issue_title(issue, test)
|
50
|
-
|
50
|
+
old_title = issue.title.strip
|
51
|
+
new_title = title_from_test(test)
|
51
52
|
|
52
|
-
|
53
|
+
warn(%(#{issue_type} title needs to be updated from '#{old_title}' to '#{new_title}'))
|
54
|
+
|
55
|
+
new_description = updated_description(issue, test)
|
56
|
+
|
57
|
+
gitlab.edit_issue(iid: issue.iid, options: { title: new_title, description: new_description })
|
53
58
|
end
|
54
59
|
|
55
60
|
private
|
data/lib/gitlab/qa/version.rb
CHANGED