gitlab-triage 1.47.0 → 1.49.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: c3318627182a7f105d948f9c81f43db29dd3f271db82968a0d80623d42a4c6d8
4
- data.tar.gz: c2c4a9208acef6b922382b8ac5e38a9d398fc55ea6d1fcac6d07bb45b7544712
3
+ metadata.gz: 6412e63a12ac53c09a1eb643cd3b5aa49e08e4691544b3356212e8ddec460d56
4
+ data.tar.gz: 2c655d476bc397a889f103763a31525116b1b647bfa382ddd9e7418cfe3e7c42
5
5
  SHA512:
6
- metadata.gz: 07c2506ececee5455224d17d52c3fed0ec4be1b1f575bc0edec27dddd8093b824d794cbdc2d084179a881db8eb94e50506a75cebbee558cd66282a25c3a89776
7
- data.tar.gz: d4f60985c3e2bb01c952fcadb1ac4669e9c792e5457d57f88f1684e87cafeaa0a6c38718a01e5d04e39a2acaed7da731dc2b59a9aa9d40a062c38fa3fb929ac5
6
+ metadata.gz: df41feed9393573cf512348b2fb8f5be16474f58ca2af16ab1190543f7cf910b97b5a5c48798927b54ca5e25c72522f2e3609dc0c9d3d46a384259372160be85
7
+ data.tar.gz: 23f44c55003c443b5535dc9be1100cf55510f4fd105fc145685cb3446a1cff8b67540db0c784340fe1cd90c999a2c08330cc9b6722c1131760b2a39fd08a7194
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-triage (1.47.0)
4
+ gitlab-triage (1.49.0)
5
5
  activesupport (>= 5.1)
6
6
  globalid (~> 1.0, >= 1.0.1)
7
7
  graphql (< 2.1.0)
data/lefthook.yml CHANGED
@@ -9,6 +9,4 @@ pre-push:
9
9
  glob: '*.{rb,rake}'
10
10
  run: bundle exec rubocop {files}
11
11
  rspec:
12
- files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
13
- glob: '*.{rb,rake}'
14
- run: bundle exec rspec {files}
12
+ run: bundle exec rspec
@@ -33,11 +33,15 @@ module Gitlab
33
33
  end
34
34
 
35
35
  def valid?
36
- title =~ /\S+/
36
+ title_present?
37
37
  end
38
38
 
39
39
  private
40
40
 
41
+ def title_present?
42
+ /\S+/.match?(title)
43
+ end
44
+
41
45
  def build_text(template)
42
46
  return '' unless template
43
47
 
@@ -36,15 +36,27 @@ module Gitlab
36
36
  end
37
37
 
38
38
  def valid?
39
- title =~ /\S+/ && (@is_custom || any_resources?)
39
+ title_present? && content_available?
40
40
  end
41
41
 
42
- def any_resources?
43
- @resources.any?
42
+ # Check if this summary has content to include in a parent summary.
43
+ # Custom type summaries generate content from templates (external data),
44
+ # but only if the template produces non-empty output.
45
+ # Regular summaries need GitLab resources to generate content.
46
+ def content_available?
47
+ if @is_custom
48
+ /\S+/.match?(description)
49
+ else
50
+ @resources.any?
51
+ end
44
52
  end
45
53
 
46
54
  private
47
55
 
56
+ def title_present?
57
+ /\S+/.match?(title)
58
+ end
59
+
48
60
  def title_resource
49
61
  { type: @type }
50
62
  end
@@ -10,7 +10,7 @@ module Gitlab
10
10
  # Build a summary from several rules policies
11
11
  def build_summary
12
12
  action = actions[:summarize]
13
- issues = resources.map do |inner_policy_spec, inner_resources|
13
+ child_summaries = resources.map do |inner_policy_spec, inner_resources|
14
14
  Policies::RulePolicy.new(
15
15
  type, inner_policy_spec, inner_resources, network)
16
16
  .build_summary
@@ -19,7 +19,7 @@ module Gitlab
19
19
  EntityBuilders::SummaryBuilder.new(
20
20
  type: type,
21
21
  action: action,
22
- resources: issues.select(&:any_resources?),
22
+ resources: child_summaries.select(&:content_available?),
23
23
  network: network,
24
24
  separator: "\n\n")
25
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module Triage
5
- VERSION = '1.47.0'
5
+ VERSION = '1.49.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-triage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.47.0
4
+ version: 1.49.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-03 00:00:00.000000000 Z
11
+ date: 2026-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport