gitlab-triage 1.47.0 → 1.48.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: dac5a3a6e2e88bb70fb33933f18755460da5d7e3cdee8965c262d6770f0f9de8
4
+ data.tar.gz: 4fd13c1a11196d09b2b2b1413f8c6a0eeed89a9c3178b7460a5df1d6678f9737
5
5
  SHA512:
6
- metadata.gz: 07c2506ececee5455224d17d52c3fed0ec4be1b1f575bc0edec27dddd8093b824d794cbdc2d084179a881db8eb94e50506a75cebbee558cd66282a25c3a89776
7
- data.tar.gz: d4f60985c3e2bb01c952fcadb1ac4669e9c792e5457d57f88f1684e87cafeaa0a6c38718a01e5d04e39a2acaed7da731dc2b59a9aa9d40a062c38fa3fb929ac5
6
+ metadata.gz: dde7d3bdf9efa243e118cc325a68ed0cf0384e1fce17d03611929cd4728543db6e0071914c55c100030ab7fff934cf95f09b6f4bc549cc847600aaf40334a9cd
7
+ data.tar.gz: 2c6f6d82ad58c8f9aa056cd7bf8b2d8cc2314f504cf358b5109c0d914483cacec88725b8ef5719623c8e6d3036f0693505e2f48e857897c8c24f5a135274eef1
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.48.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) || false
43
+ end
44
+
41
45
  def build_text(template)
42
46
  return '' unless template
43
47
 
@@ -36,15 +36,22 @@ 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
+ # while regular summaries need GitLab resources to generate content.
45
+ def content_available?
46
+ @is_custom || @resources.any?
44
47
  end
45
48
 
46
49
  private
47
50
 
51
+ def title_present?
52
+ /\S+/.match?(title) || false
53
+ end
54
+
48
55
  def title_resource
49
56
  { type: @type }
50
57
  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.48.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.48.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-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport