releasehx 0.1.0 → 0.1.2

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.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +4 -2
  3. data/build/docs/_config.yml +17 -1
  4. data/build/docs/_release_index.adoc +9 -0
  5. data/build/docs/config-reference.adoc +6 -6
  6. data/build/docs/config-reference.json +4 -3
  7. data/build/docs/index.adoc +3 -2
  8. data/build/docs/landing.adoc +10 -3
  9. data/build/docs/releases.adoc +28 -0
  10. data/build/docs/sample-config.adoc +2 -0
  11. data/build/docs/sample-config.yml +2 -2
  12. data/lib/releasehx/cli.rb +16 -7
  13. data/lib/releasehx/generated.rb +1 -1
  14. data/lib/releasehx/mcp/assets/config-def.yml +4 -2
  15. data/lib/releasehx/mcp/assets/config-reference.adoc +6 -6
  16. data/lib/releasehx/mcp/assets/config-reference.json +4 -3
  17. data/lib/releasehx/mcp/assets/sample-config.yml +2 -2
  18. data/lib/releasehx/rhyml/adapter.rb +13 -6
  19. data/lib/releasehx/rhyml/mappings/github.yaml +3 -1
  20. data/lib/releasehx/rhyml/templates/changelog.adoc.liquid +14 -0
  21. data/lib/releasehx/rhyml/templates/changelog.html.liquid +14 -0
  22. data/lib/releasehx/rhyml/templates/changelog.md.liquid +11 -0
  23. data/lib/releasehx/rhyml/templates/changes-sorter.liquid +64 -0
  24. data/lib/releasehx/rhyml/templates/config-cascade.liquid +61 -0
  25. data/lib/releasehx/rhyml/templates/entry.adoc.liquid +22 -0
  26. data/lib/releasehx/rhyml/templates/entry.html.liquid +38 -0
  27. data/lib/releasehx/rhyml/templates/entry.md.liquid +24 -0
  28. data/lib/releasehx/rhyml/templates/groupby.liquid +12 -0
  29. data/lib/releasehx/rhyml/templates/groupings.liquid +97 -0
  30. data/lib/releasehx/rhyml/templates/groups-parser.liquid +60 -0
  31. data/lib/releasehx/rhyml/templates/head-parser.liquid +34 -0
  32. data/lib/releasehx/rhyml/templates/header.liquid +17 -0
  33. data/lib/releasehx/rhyml/templates/history.adoc.liquid +11 -0
  34. data/lib/releasehx/rhyml/templates/history.html.liquid +54 -0
  35. data/lib/releasehx/rhyml/templates/history.md.liquid +16 -0
  36. data/lib/releasehx/rhyml/templates/item.liquid +35 -0
  37. data/lib/releasehx/rhyml/templates/metadata-entry.adoc.liquid +45 -0
  38. data/lib/releasehx/rhyml/templates/metadata-entry.html.liquid +2 -0
  39. data/lib/releasehx/rhyml/templates/metadata-entry.md.liquid +130 -0
  40. data/lib/releasehx/rhyml/templates/metadata-note.adoc.liquid +45 -0
  41. data/lib/releasehx/rhyml/templates/metadata-note.html.liquid +36 -0
  42. data/lib/releasehx/rhyml/templates/metadata-note.md.liquid +30 -0
  43. data/lib/releasehx/rhyml/templates/note.adoc.liquid +14 -0
  44. data/lib/releasehx/rhyml/templates/note.html.liquid +25 -0
  45. data/lib/releasehx/rhyml/templates/note.md.liquid +33 -0
  46. data/lib/releasehx/rhyml/templates/parts-listing.liquid +61 -0
  47. data/lib/releasehx/rhyml/templates/release-notes.adoc.liquid +14 -0
  48. data/lib/releasehx/rhyml/templates/release-notes.html.liquid +14 -0
  49. data/lib/releasehx/rhyml/templates/release-notes.md.liquid +14 -0
  50. data/lib/releasehx/rhyml/templates/release.adoc.liquid +16 -0
  51. data/lib/releasehx/rhyml/templates/release.html.liquid +20 -0
  52. data/lib/releasehx/rhyml/templates/release.md.liquid +20 -0
  53. data/lib/releasehx/rhyml/templates/rhyml-change-append.yaml.liquid +7 -0
  54. data/lib/releasehx/rhyml/templates/rhyml-change.yaml.liquid +40 -0
  55. data/lib/releasehx/rhyml/templates/rhyml.yaml.liquid +14 -0
  56. data/lib/releasehx/rhyml/templates/section-text.liquid +9 -0
  57. data/lib/releasehx/rhyml/templates/sections.liquid +47 -0
  58. data/lib/releasehx/rhyml/templates/tags-listing.liquid +61 -0
  59. data/lib/schemagraphy/regexp_utils.rb +21 -1
  60. data/specs/data/config-def.yml +4 -2
  61. metadata +42 -2
  62. data/build/docs/Gemfile.lock +0 -95
@@ -0,0 +1,61 @@
1
+ {%- assign tags_listing = "" %}
2
+ {%- assign tags_count = 0 %}
3
+ {%- for tag in change.tags %}
4
+ {%- assign skip_tag = false %}
5
+ {%- if tag == "changelog" or tag == "release_note_needed" %}
6
+ {%- assign skip_tag = true %}
7
+ {%- elsif tag == group1_slug or tag == group2_slug %}
8
+ {%- assign skip_tag = true %}
9
+ {%- elsif config.tags[tag] == nil %}
10
+ {%- assign skip_tag = true %}
11
+ {%- endif %}
12
+ {%- unless skip_tag %}
13
+ {%- assign tags_count = tags_count | plus: 1 %}
14
+ {%- endunless %}
15
+ {%- endfor %}
16
+
17
+ {%- if tags_count > 0 %}
18
+ {%- capture tags_listing -%}
19
+ {%- if show_labels -%}
20
+ {%- if format == "asciidoc" -%}
21
+ {%- if labeling_singularize_labels and tags_count == 1 -%}
22
+ [.meta-label.tags-label]*{{ labeling_tag_label }}:*{%- else -%}[.meta-label.tags-label]*{{ labeling_tags_label }}:*{%- endif -%}
23
+ {%- elsif format == "markdown" -%}
24
+ {%- if labeling_singularize_labels and tags_count == 1 -%}
25
+ {{ labeling_tag_label }}: {%- else -%}{{ labeling_tags_label }}: {%- endif -%}
26
+ {%- endif -%}
27
+ {%- endif -%}
28
+ {%- assign tag_texts = "" | split: "," -%}
29
+ {%- for tag in change.tags -%}
30
+ {%- assign skip_tag = false -%}
31
+ {%- if tag == "changelog" or tag == "release_note_needed" -%}
32
+ {%- assign skip_tag = true -%}
33
+ {%- elsif tag == group1_slug or tag == group2_slug -%}
34
+ {%- assign skip_tag = true -%}
35
+ {%- elsif config.tags[tag] == nil -%}
36
+ {%- assign skip_tag = true -%}
37
+ {%- endif -%}
38
+ {%- unless skip_tag -%}
39
+ {%- capture tag_text -%}
40
+ {%- if config.tags[tag].icon and show_icons and show_icons == "before" -%}
41
+ {%- if format == "asciidoc" -%}icon:{{ config.tags[tag].icon }}[] {%- endif -%}
42
+ {%- endif -%}
43
+ {%- if format == "asciidoc" -%}
44
+ {{ config.tags[tag]['text'] | default: tag }}{%- elsif format == "markdown" -%}{{ config.tags[tag]['text'] | default: tag }}{%- endif -%}
45
+ {%- if config.tags[tag].icon and show_icons and show_icons == "after" -%}
46
+ {%- if format == "asciidoc" -%} icon:{{ config.tags[tag].icon }}[]{%- endif -%}
47
+ {%- endif -%}
48
+ {%- endcapture -%}
49
+ {%- assign tag_texts = tag_texts | push: tag_text -%}
50
+ {%- endunless -%}
51
+ {%- endfor -%}
52
+ {%- if tag_texts.size > 0 -%}
53
+ {%- if format == "asciidoc" -%}
54
+ {%- for tag_text in tag_texts -%}
55
+ {{ tag_text }}{%- unless forloop.last %} {%- endunless -%}
56
+ {%- endfor -%}
57
+ {%- elsif format == "markdown" -%}
58
+ {{ tag_texts | join: ", " }}{%- endif -%}
59
+ {%- endif -%}
60
+ {%- endcapture -%}
61
+ {%- endif -%}
@@ -35,8 +35,28 @@ module SchemaGraphy
35
35
  # Remove surrounding quotes that might come from YAML parsing
36
36
  clean_input = input_str.gsub(/^["']|["']$/, '')
37
37
 
38
+ # Manual parsing for /pattern/flags format (common in YAML configs)
39
+ if clean_input =~ %r{^/(.+)/([a-z]*)$}
40
+ pattern_str = Regexp.last_match(1)
41
+ flags_str = Regexp.last_match(2)
42
+ options = flags_to_options(flags_str)
43
+
44
+ begin
45
+ regexp_obj = Regexp.new(pattern_str, options)
46
+
47
+ return {
48
+ pattern: pattern_str,
49
+ flags: flags_str,
50
+ regexp: regexp_obj,
51
+ options: options
52
+ }
53
+ rescue RegexpError => e
54
+ raise RegexpError, "Invalid regex pattern '#{input}': #{e.message}"
55
+ end
56
+ end
57
+
38
58
  # Heuristic to detect if it's a Regexp literal
39
- is_literal = (clean_input.start_with?('/') && clean_input.rindex('/').positive?) || clean_input.start_with?('%r{')
59
+ is_literal = clean_input.start_with?('%r{')
40
60
 
41
61
  if is_literal
42
62
  # Try to parse as regex literal using to_regexp
@@ -165,6 +165,7 @@ properties:
165
165
  Must be `issue_body`, `custom_field`, or `commit_message`.
166
166
 
167
167
  Defaults to `issue_body` for GitHub and GitLab, but to `custom_field` for Jira.
168
+ dflt: issue_body
168
169
  note_custom_field:
169
170
  type: String
170
171
  desc: |
@@ -182,7 +183,8 @@ properties:
182
183
  Uses Capture group `note` in the Regular Expression to establish the entire note content.
183
184
 
184
185
  See the `conversions.head_pattern` property for details on extracting a heading (`head` in RHYML) from the `note` content.
185
- dflt: '/^((#|=)+ (Draft )?Release Note.*)|(<!-- (draft )?release note -->)\n(?<note>\w(.|\n)+)/gmi'
186
+ dflt: '/^(((#|=)+ (Draft )?Release Note.*?)|(<!-- (draft )?release note -->))\n+(?<note>(.|
187
+ )+)/gmi'
186
188
  head_pattern:
187
189
  type: RegExp
188
190
  desc: |
@@ -1162,7 +1164,7 @@ properties:
1162
1164
  The label to use for the _singular_ part/component affected by the change, when only one part is permitted.
1163
1165
 
1164
1166
  This value will apply either when <<conf_ppty_rhyml_max_parts>> is set to `1` or when the change has only one part _and_ <<conf_ppty_history_labeling_singularize_labels>> is `true`.
1165
- dflt: Part
1167
+ dflt: Component
1166
1168
  parts_icon:
1167
1169
  type: String
1168
1170
  desc: |
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: releasehx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - DocOpsLab
@@ -266,8 +266,8 @@ files:
266
266
  - bin/rhx-mcp
267
267
  - bin/sourcerer
268
268
  - build/docs/CNAME
269
- - build/docs/Gemfile.lock
270
269
  - build/docs/_config.yml
270
+ - build/docs/_release_index.adoc
271
271
  - build/docs/config-reference.adoc
272
272
  - build/docs/config-reference.json
273
273
  - build/docs/index.adoc
@@ -275,6 +275,7 @@ files:
275
275
  - build/docs/manpage.adoc
276
276
  - build/docs/releasehx.1
277
277
  - build/docs/releasehx_readme.html
278
+ - build/docs/releases.adoc
278
279
  - build/docs/sample-config.adoc
279
280
  - build/docs/sample-config.yml
280
281
  - build/docs/schemagraphy_readme.html
@@ -319,6 +320,45 @@ files:
319
320
  - lib/releasehx/rhyml/mappings/jira.yaml
320
321
  - lib/releasehx/rhyml/mappings/verb_past_tenses.yml
321
322
  - lib/releasehx/rhyml/release.rb
323
+ - lib/releasehx/rhyml/templates/changelog.adoc.liquid
324
+ - lib/releasehx/rhyml/templates/changelog.html.liquid
325
+ - lib/releasehx/rhyml/templates/changelog.md.liquid
326
+ - lib/releasehx/rhyml/templates/changes-sorter.liquid
327
+ - lib/releasehx/rhyml/templates/config-cascade.liquid
328
+ - lib/releasehx/rhyml/templates/entry.adoc.liquid
329
+ - lib/releasehx/rhyml/templates/entry.html.liquid
330
+ - lib/releasehx/rhyml/templates/entry.md.liquid
331
+ - lib/releasehx/rhyml/templates/groupby.liquid
332
+ - lib/releasehx/rhyml/templates/groupings.liquid
333
+ - lib/releasehx/rhyml/templates/groups-parser.liquid
334
+ - lib/releasehx/rhyml/templates/head-parser.liquid
335
+ - lib/releasehx/rhyml/templates/header.liquid
336
+ - lib/releasehx/rhyml/templates/history.adoc.liquid
337
+ - lib/releasehx/rhyml/templates/history.html.liquid
338
+ - lib/releasehx/rhyml/templates/history.md.liquid
339
+ - lib/releasehx/rhyml/templates/item.liquid
340
+ - lib/releasehx/rhyml/templates/metadata-entry.adoc.liquid
341
+ - lib/releasehx/rhyml/templates/metadata-entry.html.liquid
342
+ - lib/releasehx/rhyml/templates/metadata-entry.md.liquid
343
+ - lib/releasehx/rhyml/templates/metadata-note.adoc.liquid
344
+ - lib/releasehx/rhyml/templates/metadata-note.html.liquid
345
+ - lib/releasehx/rhyml/templates/metadata-note.md.liquid
346
+ - lib/releasehx/rhyml/templates/note.adoc.liquid
347
+ - lib/releasehx/rhyml/templates/note.html.liquid
348
+ - lib/releasehx/rhyml/templates/note.md.liquid
349
+ - lib/releasehx/rhyml/templates/parts-listing.liquid
350
+ - lib/releasehx/rhyml/templates/release-notes.adoc.liquid
351
+ - lib/releasehx/rhyml/templates/release-notes.html.liquid
352
+ - lib/releasehx/rhyml/templates/release-notes.md.liquid
353
+ - lib/releasehx/rhyml/templates/release.adoc.liquid
354
+ - lib/releasehx/rhyml/templates/release.html.liquid
355
+ - lib/releasehx/rhyml/templates/release.md.liquid
356
+ - lib/releasehx/rhyml/templates/rhyml-change-append.yaml.liquid
357
+ - lib/releasehx/rhyml/templates/rhyml-change.yaml.liquid
358
+ - lib/releasehx/rhyml/templates/rhyml.yaml.liquid
359
+ - lib/releasehx/rhyml/templates/section-text.liquid
360
+ - lib/releasehx/rhyml/templates/sections.liquid
361
+ - lib/releasehx/rhyml/templates/tags-listing.liquid
322
362
  - lib/releasehx/sgyml/helpers.rb
323
363
  - lib/releasehx/transforms/adf_to_markdown.rb
324
364
  - lib/releasehx/version.rb
@@ -1,95 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- addressable (2.8.7)
5
- public_suffix (>= 2.0.2, < 7.0)
6
- asciidoctor (2.0.23)
7
- base64 (0.3.0)
8
- bigdecimal (3.2.3)
9
- colorator (1.1.0)
10
- concurrent-ruby (1.3.5)
11
- csv (3.3.5)
12
- em-websocket (0.5.3)
13
- eventmachine (>= 0.12.9)
14
- http_parser.rb (~> 0)
15
- eventmachine (1.2.7)
16
- ffi (1.17.2-x86_64-linux-gnu)
17
- forwardable-extended (2.6.0)
18
- google-protobuf (4.32.1-x86_64-linux-gnu)
19
- bigdecimal
20
- rake (>= 13)
21
- http_parser.rb (0.8.0)
22
- i18n (1.14.7)
23
- concurrent-ruby (~> 1.0)
24
- jekyll (4.4.1)
25
- addressable (~> 2.4)
26
- base64 (~> 0.2)
27
- colorator (~> 1.0)
28
- csv (~> 3.0)
29
- em-websocket (~> 0.5)
30
- i18n (~> 1.0)
31
- jekyll-sass-converter (>= 2.0, < 4.0)
32
- jekyll-watch (~> 2.0)
33
- json (~> 2.6)
34
- kramdown (~> 2.3, >= 2.3.1)
35
- kramdown-parser-gfm (~> 1.0)
36
- liquid (~> 4.0)
37
- mercenary (~> 0.3, >= 0.3.6)
38
- pathutil (~> 0.9)
39
- rouge (>= 3.0, < 5.0)
40
- safe_yaml (~> 1.0)
41
- terminal-table (>= 1.8, < 4.0)
42
- webrick (~> 1.7)
43
- jekyll-asciidoc (3.0.1)
44
- asciidoctor (>= 1.5.0, < 3.0.0)
45
- jekyll (>= 3.0.0)
46
- jekyll-include-cache (0.2.1)
47
- jekyll (>= 3.7, < 5.0)
48
- jekyll-sass-converter (3.1.0)
49
- sass-embedded (~> 1.75)
50
- jekyll-seo-tag (2.8.0)
51
- jekyll (>= 3.8, < 5.0)
52
- jekyll-watch (2.2.1)
53
- listen (~> 3.0)
54
- json (2.15.0)
55
- just-the-docs (0.10.1)
56
- jekyll (>= 3.8.5)
57
- jekyll-include-cache
58
- jekyll-seo-tag (>= 2.0)
59
- rake (>= 12.3.1)
60
- kramdown (2.5.1)
61
- rexml (>= 3.3.9)
62
- kramdown-parser-gfm (1.1.0)
63
- kramdown (~> 2.0)
64
- liquid (4.0.4)
65
- listen (3.9.0)
66
- rb-fsevent (~> 0.10, >= 0.10.3)
67
- rb-inotify (~> 0.9, >= 0.9.10)
68
- mercenary (0.4.0)
69
- pathutil (0.16.2)
70
- forwardable-extended (~> 2.6)
71
- public_suffix (6.0.2)
72
- rake (13.3.0)
73
- rb-fsevent (0.11.2)
74
- rb-inotify (0.11.1)
75
- ffi (~> 1.0)
76
- rexml (3.4.4)
77
- rouge (4.6.1)
78
- safe_yaml (1.0.5)
79
- sass-embedded (1.93.2-x86_64-linux-gnu)
80
- google-protobuf (~> 4.31)
81
- terminal-table (3.0.2)
82
- unicode-display_width (>= 1.1.1, < 3)
83
- unicode-display_width (2.6.0)
84
- webrick (1.9.1)
85
-
86
- PLATFORMS
87
- x86_64-linux
88
-
89
- DEPENDENCIES
90
- jekyll
91
- jekyll-asciidoc
92
- just-the-docs
93
-
94
- BUNDLED WITH
95
- 2.4.19