gitlab-qa 7.24.4 → 7.24.5

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: 86868c3764df21242c8600de6406579ebb747a7d8efcb1aa04393e49af8cf10d
4
- data.tar.gz: bb659bc291814572d6fdb6f73b77ef6c8a57eb52d10d2412f96b8998f5ba166a
3
+ metadata.gz: 68f574050bbfc1f6ede0a0bb9f87b5e5c1e8f5403739f56294cae2fb1e60fccc
4
+ data.tar.gz: 57a53ed8a9e1f1071a38bfb96ad46ed13fd566023ac9460751f0dc3da4874291
5
5
  SHA512:
6
- metadata.gz: f4e796a110f8044e5eed1b99154672b6371ebb23c41b055e7302295bf2c1cfc5ea8c043c23040385a46340ad02bc07372d307e38e28f1585027047663a824be6
7
- data.tar.gz: e77ffb360b79a845d000411b55748efa3e7bb4c0bdebfe725ee40dafddc75102cd9cdb86d2e0570c04edb9cad6fbe04193c55a84f35f1304697a505415e32ea6
6
+ metadata.gz: da89e0ab1a89cefa915d6b734867a78fd6d8e66725d9ba75dac1eeae8faa007cf7fd8fe97372a5f5919a08a8cc482694cc2d9eab25083fc5502d26c3425e082e
7
+ data.tar.gz: a293a8034877b7f64718e18969809e25dac26943667aafed41e93a433677369ee956707d447234c3d75d5112011d9423a9f4f46102ad4817f833122004d3f560
@@ -0,0 +1,13 @@
1
+ <!--
2
+ Before raising an issue to the GitLab issue tracker, please read through our guide for finding help to determine the best place to post:
3
+
4
+ * https://about.gitlab.com/getting-help/
5
+
6
+ If you are experiencing an issue when using GitLab.com, your first port of call should be the Community Forum. Your issue may have already been reported there by another user. Please check:
7
+
8
+ * https://forum.gitlab.com/
9
+
10
+ If you feel that your issue can be categorized as a reproducible bug or a feature proposal, please use one of the issue templates provided and include as much information as possible.
11
+
12
+ Thank you for helping to make GitLab a better product.
13
+ -->
@@ -0,0 +1,46 @@
1
+ ## What does this MR do and why?
2
+
3
+ _Describe in detail what your merge request does and why._
4
+
5
+ <!--
6
+ Please keep this description updated with any discussion that takes place so
7
+ that reviewers can understand your intent. Keeping the description updated is
8
+ especially important if they didn't participate in the discussion.
9
+ -->
10
+
11
+ ## Screenshots or screen recordings
12
+
13
+ _These are strongly recommended to assist reviewers and reduce the time to merge your change._
14
+
15
+ <!--
16
+ Please include any relevant screenshots or screen recordings that will assist
17
+ reviewers and future readers. If you need help visually verifying the change,
18
+ please leave a comment and ping a GitLab reviewer, maintainer, or MR coach.
19
+ -->
20
+
21
+ ## How to set up and validate locally
22
+
23
+ _Numbered steps to set up and validate the change are strongly suggested._
24
+
25
+ <!--
26
+ Example below:
27
+
28
+ 1. Enable the invite modal
29
+ ```ruby
30
+ Feature.enable(:invite_members_group_modal)
31
+ ```
32
+ 1. In rails console enable the experiment fully
33
+ ```ruby
34
+ Feature.enable(:member_areas_of_focus)
35
+ ```
36
+ 1. Visit any group or project member pages such as `http://127.0.0.1:3000/groups/flightjs/-/group_members`
37
+ 1. Click the `invite members` button.
38
+ -->
39
+
40
+ ## MR acceptance checklist
41
+
42
+ This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
43
+
44
+ * [ ] I have evaluated the [MR acceptance checklist](https://docs.gitlab.com/ee/development/code_review.html#acceptance-checklist) for this MR.
45
+
46
+ /label ~QA ~Quality
data/gitlab-qa.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.require_paths = ['lib']
22
22
 
23
23
  spec.add_development_dependency 'climate_control', '~> 1.0.1'
24
- spec.add_development_dependency 'gitlab-dangerfiles', '~> 2.10'
24
+ spec.add_development_dependency 'gitlab-dangerfiles', '~> 2.11'
25
25
  spec.add_development_dependency 'gitlab-styles', '~> 6.2.1'
26
26
  spec.add_development_dependency 'pry', '~> 0.11'
27
27
  spec.add_development_dependency 'rake', '~> 13.0'
@@ -77,12 +77,24 @@ module Gitlab
77
77
  end
78
78
  end
79
79
 
80
+ def find_issue_notes(iid:)
81
+ handle_gitlab_client_exceptions do
82
+ Gitlab.issue_notes(project, iid, order_by: 'created_at', sort: 'asc').auto_paginate
83
+ end
84
+ end
85
+
80
86
  def create_issue_note(iid:, note:)
81
87
  handle_gitlab_client_exceptions do
82
88
  Gitlab.create_issue_note(project, iid, note)
83
89
  end
84
90
  end
85
91
 
92
+ def edit_issue_note(issue_iid:, note_id:, note:)
93
+ handle_gitlab_client_exceptions do
94
+ Gitlab.edit_issue_note(project, issue_iid, note_id, note)
95
+ end
96
+ end
97
+
86
98
  def add_note_to_issue_discussion_as_thread(iid:, discussion_id:, body:)
87
99
  handle_gitlab_client_exceptions do
88
100
  Gitlab.add_note_to_issue_discussion_as_thread(project, iid, discussion_id, body: body)
@@ -61,7 +61,7 @@ module Gitlab
61
61
 
62
62
  if issue
63
63
  puts " => Found issue #{issue.web_url} for test '#{test.name}' with a diff ratio of #{(diff_ratio * 100).round(2)}%."
64
- @commented_issue_list.include?(issue.web_url) ? (puts " => Failure already commented on issue.") : post_failed_job_note(issue, test)
64
+ @commented_issue_list.include?(issue.web_url) ? (puts " => Failure already commented on issue.") : post_or_update_failed_job_note(issue, test)
65
65
  @commented_issue_list.add(issue.web_url)
66
66
  end
67
67
 
@@ -164,14 +164,30 @@ module Gitlab
164
164
  super << pipeline_name_label
165
165
  end
166
166
 
167
- def post_failed_job_note(issue, test)
168
- gitlab.create_issue_note(iid: issue.iid, note: "Failure occurred in #{pipeline} pipeline: #{test.ci_job_url}")
167
+ def post_or_update_failed_job_note(issue, test)
168
+ current_note = "Failed most recently in #{pipeline} pipeline: #{test.ci_job_url}"
169
+ existing_note = existing_failure_note(issue)
170
+
171
+ if existing_note
172
+ gitlab.edit_issue_note(issue_iid: issue.iid, note_id: existing_note.id, note: current_note)
173
+ else
174
+ gitlab.create_issue_note(iid: issue.iid, note: current_note)
175
+ end
176
+
169
177
  puts " => Linked #{test.ci_job_url} to #{issue.web_url}."
170
178
  end
171
179
 
172
180
  def new_issue_title(test)
173
181
  "Failure in #{super}"
174
182
  end
183
+
184
+ def existing_failure_note(issue)
185
+ gitlab.find_issue_notes(iid: issue.iid).each do |note|
186
+ return note if note.body.include?('Failed most recently in')
187
+ end
188
+
189
+ false
190
+ end
175
191
  end
176
192
  end
177
193
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '7.24.4'
5
+ VERSION = '7.24.5'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.24.4
4
+ version: 7.24.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-14 00:00:00.000000000 Z
11
+ date: 2022-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.10'
33
+ version: '2.11'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.10'
40
+ version: '2.11'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: gitlab-styles
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -220,6 +220,8 @@ files:
220
220
  - ".gitlab-ci.yml"
221
221
  - ".gitlab/ci/danger.gitlab-ci.yml"
222
222
  - ".gitlab/ci/rules.gitlab-ci.yml"
223
+ - ".gitlab/issue_templates/Default.md"
224
+ - ".gitlab/merge_request_templates/Default.md"
223
225
  - ".gitlab/merge_request_templates/Release.md"
224
226
  - ".rspec"
225
227
  - ".rubocop.yml"