allure-report-publisher 1.6.0 → 1.6.1

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: ee22a2a52b71b269de3fb6edd02c444b3bf6e553f051bd1e8b495f6cffbb2b80
4
- data.tar.gz: e87c8cec9aa3c444cb7d2225d9cc401a9c7f39d0940ed5b57ca8a5d5a2368f77
3
+ metadata.gz: 9a83ddae37cb9dc7ced422cab40ccfa85fc4bf0079861337a879619eb4d27de3
4
+ data.tar.gz: aa06177f85474c9f48cd6999dfbc81e0b95fb280a060b8f277652ba1d005f1be
5
5
  SHA512:
6
- metadata.gz: 472478dd1264503de2409b2eb6c2b9fb5239624aff499987d5741ca6ee3d22a9c7397dc85c1af3b9718b7fbfbbcfe1d842e48d1350452877041a40829f59bdc3
7
- data.tar.gz: e24e932b8dd7d05e651dcb4622fd50381bde03f931547160918c6ff25b943f858b8e9f19291d5db7da2635d5926faf5fac2d43d33bf38c48d37c3cc77fd55b9b
6
+ metadata.gz: 7882b84ae508f5b0fc9b55745e1deba83c56bad9b2a374216b76ae983f150fb66d0bdb873ce27d57192a29c03d0a41d31b62b9d2e54504b28ef27d88f02b3648
7
+ data.tar.gz: a090b1670c9611808eacaf6e081110e369068d776ec4de32eaaa822cc31ac50bd124c81c3ae8ab9840eb76df84a615ef91c04005151071a372137ac36d0ed4e0
@@ -58,7 +58,7 @@ module Publisher
58
58
  )
59
59
  end
60
60
 
61
- # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
61
+ # rubocop:disable Metrics/PerceivedComplexity
62
62
  # Add comment with report url
63
63
  #
64
64
  # @return [void]
@@ -79,13 +79,21 @@ module Publisher
79
79
 
80
80
  @discussion = nil
81
81
 
82
- if unresolved_discussion_on_failure && main_comment&.body&.include?("❌") && !alert_comment
82
+ if unresolved_discussion_on_failure && report_has_failures? && !alert_comment
83
83
  client.create_merge_request_discussion_note(project, mr_iid, discussion.id, body: alert_comment_text)
84
- elsif alert_comment
84
+ elsif alert_comment && !report_has_failures?
85
85
  client.delete_merge_request_discussion_note(project, mr_iid, discussion.id, alert_comment.id)
86
86
  end
87
87
  end
88
- # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
88
+
89
+ # Check if allure report has failures
90
+ #
91
+ # @return [Boolean]
92
+ def report_has_failures?
93
+ main_comment&.body&.include?("❌")
94
+ end
95
+
96
+ # rubocop:enable Metrics/PerceivedComplexity
89
97
 
90
98
  # Existing discussion that has comment with allure urls
91
99
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Publisher
4
- VERSION = "1.6.0"
4
+ VERSION = "1.6.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allure-report-publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrejs Cunskis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-25 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3