gitlab-qa 7.19.0 → 7.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7314a9036c9aeacae478aaf82d13baee97c53c94bf5aabe800ec0e9f98b5234d
4
- data.tar.gz: 83fe883428323a6edc87c1993564de31dcd5afc79aada90798ea07d93a1b09fb
3
+ metadata.gz: f7b10d593ddaeee4b4e931904d7332f845b1fb8f816e5e42d3c79e22634ff680
4
+ data.tar.gz: 93b081c8de2108f2b9f17462319b3ac5467671a3b775ab597fbe317b0f7646aa
5
5
  SHA512:
6
- metadata.gz: 7e3d05561762175dae31c8298ef4411595287f516f3fc809457e842c368a7ea712c6c2f697a1c1849c1ff26b060b68220327e5d3cb5e5792426bb886881a233a
7
- data.tar.gz: 062b24dfdf48a7da1d309b0282f4972d1f6e72dbb2ad4a44f2ad8c2c352f3684ff0b423390070dcc83c9228b19597bc0ddfee94aef017810f5283c673511e472
6
+ metadata.gz: 1f590d463f6fea2e69dba2ad64ac15274011a63863db9c8d9544e24e07c91a683a92709b96f0628d114da4d825bc5a4e5104bdf9c6bbd57750ef2b3f20007ee8
7
+ data.tar.gz: 681dd9b8d51cc491a75a4beba08391ffecbb7ecef6218c9db51854d452e4a7a2bf9e9fe36e7e9603608be4d5468d6ecf0462951004eb1f68155715d2a9497216
@@ -117,6 +117,10 @@ module Gitlab
117
117
  def error_and_stack_trace(text)
118
118
  text.strip[/Error:(.*)/m, 1].to_s
119
119
  end
120
+
121
+ def updated_description(issue, test)
122
+ new_issue_description(test)
123
+ end
120
124
  end
121
125
  end
122
126
  end
@@ -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}#{TEST_CASE_RESULTS_SECTION_TEMPLATE}"
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
- warn(%(#{issue_type} title needs to be updated from '#{issue.title.strip}' to '#{title_from_test(test)}'))
50
+ old_title = issue.title.strip
51
+ new_title = title_from_test(test)
51
52
 
52
- gitlab.edit_issue(iid: issue.iid, options: { title: title_from_test(test) })
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '7.19.0'
5
+ VERSION = '7.20.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.19.0
4
+ version: 7.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality