releasehx 0.1.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.
Files changed (91) hide show
  1. checksums.yaml +7 -0
  2. data/README.adoc +2915 -0
  3. data/bin/releasehx +7 -0
  4. data/bin/rhx +7 -0
  5. data/bin/rhx-mcp +7 -0
  6. data/bin/sourcerer +32 -0
  7. data/build/docs/CNAME +1 -0
  8. data/build/docs/Gemfile.lock +95 -0
  9. data/build/docs/_config.yml +36 -0
  10. data/build/docs/config-reference.adoc +4104 -0
  11. data/build/docs/config-reference.json +1546 -0
  12. data/build/docs/index.adoc +2915 -0
  13. data/build/docs/landing.adoc +21 -0
  14. data/build/docs/manpage.adoc +68 -0
  15. data/build/docs/releasehx.1 +281 -0
  16. data/build/docs/releasehx_readme.html +367 -0
  17. data/build/docs/sample-config.adoc +9 -0
  18. data/build/docs/sample-config.yml +251 -0
  19. data/build/docs/schemagraphy_readme.html +0 -0
  20. data/build/docs/sourcerer_readme.html +46 -0
  21. data/build/snippets/helpscreen.txt +29 -0
  22. data/lib/docopslab/mcp/asset_packager.rb +30 -0
  23. data/lib/docopslab/mcp/manifest.rb +67 -0
  24. data/lib/docopslab/mcp/resource_pack.rb +46 -0
  25. data/lib/docopslab/mcp/server.rb +92 -0
  26. data/lib/docopslab/mcp.rb +6 -0
  27. data/lib/releasehx/cli.rb +937 -0
  28. data/lib/releasehx/configuration.rb +215 -0
  29. data/lib/releasehx/generated.rb +17 -0
  30. data/lib/releasehx/helpers.rb +58 -0
  31. data/lib/releasehx/mcp/asset_packager.rb +21 -0
  32. data/lib/releasehx/mcp/assets/agent-config-guide.md +178 -0
  33. data/lib/releasehx/mcp/assets/config-def.yml +1426 -0
  34. data/lib/releasehx/mcp/assets/config-reference.adoc +4104 -0
  35. data/lib/releasehx/mcp/assets/config-reference.json +1546 -0
  36. data/lib/releasehx/mcp/assets/sample-config.yml +251 -0
  37. data/lib/releasehx/mcp/manifest.rb +18 -0
  38. data/lib/releasehx/mcp/resource_pack.rb +26 -0
  39. data/lib/releasehx/mcp/server.rb +57 -0
  40. data/lib/releasehx/mcp.rb +7 -0
  41. data/lib/releasehx/ops/check_ops.rb +136 -0
  42. data/lib/releasehx/ops/draft_ops.rb +173 -0
  43. data/lib/releasehx/ops/enrich_ops.rb +221 -0
  44. data/lib/releasehx/ops/template_ops.rb +61 -0
  45. data/lib/releasehx/ops/write_ops.rb +124 -0
  46. data/lib/releasehx/rest/clients/github.yml +46 -0
  47. data/lib/releasehx/rest/clients/gitlab.yml +31 -0
  48. data/lib/releasehx/rest/clients/jira.yml +31 -0
  49. data/lib/releasehx/rest/yaml_client.rb +418 -0
  50. data/lib/releasehx/rhyml/adapter.rb +740 -0
  51. data/lib/releasehx/rhyml/change.rb +167 -0
  52. data/lib/releasehx/rhyml/liquid.rb +13 -0
  53. data/lib/releasehx/rhyml/loaders.rb +37 -0
  54. data/lib/releasehx/rhyml/mappings/github.yaml +60 -0
  55. data/lib/releasehx/rhyml/mappings/gitlab.yaml +73 -0
  56. data/lib/releasehx/rhyml/mappings/jira.yaml +29 -0
  57. data/lib/releasehx/rhyml/mappings/verb_past_tenses.yml +98 -0
  58. data/lib/releasehx/rhyml/release.rb +144 -0
  59. data/lib/releasehx/rhyml.rb +15 -0
  60. data/lib/releasehx/sgyml/helpers.rb +45 -0
  61. data/lib/releasehx/transforms/adf_to_markdown.rb +307 -0
  62. data/lib/releasehx/version.rb +7 -0
  63. data/lib/releasehx.rb +69 -0
  64. data/lib/schemagraphy/attribute_resolver.rb +48 -0
  65. data/lib/schemagraphy/cfgyml/definition.rb +90 -0
  66. data/lib/schemagraphy/cfgyml/doc_builder.rb +52 -0
  67. data/lib/schemagraphy/cfgyml/path_reference.rb +24 -0
  68. data/lib/schemagraphy/data_query/json_pointer.rb +42 -0
  69. data/lib/schemagraphy/loader.rb +59 -0
  70. data/lib/schemagraphy/regexp_utils.rb +215 -0
  71. data/lib/schemagraphy/safe_expression.rb +189 -0
  72. data/lib/schemagraphy/schema_utils.rb +124 -0
  73. data/lib/schemagraphy/tag_utils.rb +32 -0
  74. data/lib/schemagraphy/templating.rb +104 -0
  75. data/lib/schemagraphy.rb +17 -0
  76. data/lib/sourcerer/builder.rb +120 -0
  77. data/lib/sourcerer/jekyll/bootstrapper.rb +78 -0
  78. data/lib/sourcerer/jekyll/liquid/file_system.rb +74 -0
  79. data/lib/sourcerer/jekyll/liquid/filters.rb +215 -0
  80. data/lib/sourcerer/jekyll/liquid/tags.rb +44 -0
  81. data/lib/sourcerer/jekyll/monkeypatches.rb +73 -0
  82. data/lib/sourcerer/jekyll.rb +26 -0
  83. data/lib/sourcerer/plaintext_converter.rb +75 -0
  84. data/lib/sourcerer/templating.rb +190 -0
  85. data/lib/sourcerer.rb +322 -0
  86. data/specs/data/api-client-schema.yaml +160 -0
  87. data/specs/data/config-def.yml +1426 -0
  88. data/specs/data/mcp-manifest.yml +50 -0
  89. data/specs/data/rhyml-mapping-schema.yaml +410 -0
  90. data/specs/data/rhyml-schema.yaml +152 -0
  91. metadata +376 -0
@@ -0,0 +1,251 @@
1
+ # Sample configuration file generated from the configuration definition.
2
+ # All values are upstream (gem) defaults.
3
+ # Properties without defaults are commented out.
4
+ $meta: # The metadata settings for the configuration file.
5
+ markup: markdown # The markup format used in strings in this configuration file.
6
+ slug_type: kebab # The format of slugs used in your application, for use with sluggerize Liquid filter.
7
+ tplt_lang: liquid # The default format used in fields of Template type.
8
+ origin: # The API or file source for the issues.
9
+ source: rhyml # Issue source API type (jira, github, gitlab, rhyml)
10
+ # project: # The string used to identify the project in the remote API.
11
+ # href: | # The local or remote URI for the API or JSON file.
12
+ auth: # Properties related to API authentication.
13
+ # mode: # The type of authentication to use.
14
+ # header: # The header to use for authentication.
15
+ cred_uri: RELEASEHX_API_CRED # The location of the API credentials file for declaring API authentication arguments without environment variables.
16
+ cred_key_line: 1 # Number of the line of the credentials file (at <<confpptyoriginauthcreduri>>) on which the key or token string appears.
17
+ cred_user_line: 2 # Number of the line of the credentials file (at <<confpptyoriginauthcreduri>>) on which the user string appears.
18
+ cred_org_line: 3 # Number of the line of the credentials file (at <<confpptyoriginauthcreduri>>) on which the org string appears.
19
+ key_env: RELEASEHX_API_KEY # Name of the environment variable containing the API key or token.
20
+ user_env: RELEASEHX_API_USER # Name of the environment variable containing the API username.
21
+ org_env: RELEASEHX_API_ORG # Name of the environment variable containing the organization credential.
22
+ conversions: # Details about content origination, as well as markup sources and conversion.
23
+ summ: issue # The source of the summary (Changelog) content.
24
+ # head: # The source of release-note headlines, when it is not the same as the summary.
25
+ # note: # The source of the release notes content.
26
+ # note_custom_field: # The name of the custom field to use for the release notes content.Liquid error: wrong number of arguments (given 3, expected 1..2)Liquid error: wrong number of arguments (given 3, expected 1..2)
27
+ markup: markdown # The origin markup format for notes.
28
+ # engine: # The markup converter to use for the issues.
29
+ extensions: # Default file extensions.
30
+ markdown: md # File extension for Markdown drafts.
31
+ asciidoc: adoc # File extension for AsciiDoc drafts.
32
+ yaml: yml # File extension for YAML drafts.
33
+ types: # Issue types to include in the release history, in the order of display.
34
+ label_prefix: # The prefix used in issue labels to identify type labels.
35
+ feature: # A new capability, functionality, or interface element.
36
+ slug: feature # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
37
+ text: New feature # The display label for the type in the release history output.
38
+ head: New features # The header for the type in the release history output.
39
+ icon: plus-square-o # The icon to use for issues of this type.
40
+ bug: # A fix for a previously reported issue.
41
+ slug: bug # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
42
+ text: Bug fix # The display label for the type in the release history output.
43
+ head: Bug fixes # The header for the type in the release history output.
44
+ icon: bug # The icon to use for issues of this type.
45
+ improvement: # An enhancement to an existing capability, functionality, or interface element.
46
+ slug: improvement # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
47
+ text: Improvement # The display label for the type in the release history output.
48
+ head: Improvements # The header for the type in the release history output.
49
+ icon: wrench # The icon to use for issues of this type.
50
+ documentation: # An update to the documentation.
51
+ slug: documentation # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
52
+ text: Documentation # The display label for the type in the release history output.
53
+ head: Docs Changes # The header for the type in the release history output.
54
+ icon: book # The icon to use for issues of this type.
55
+ # <type_name>: # The corresponding issue type.
56
+ # slug: # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
57
+ # text: # The display label for the type in the release history output.
58
+ # head: # The header for the type in the release history output.
59
+ # icon: # The icon to use for issues of this type.
60
+ parts: # The map of product components to include in the release history, in the order of display.
61
+ label_prefix: "part:" # The prefix used in issue labels to identify component/part labels.
62
+ # <part_name>: # The corresponding product component.
63
+ # slug: # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
64
+ # text: # The display text for the component in the release history output.
65
+ # head: # The header for the component in the release history output.
66
+ # icon: # The icon to use for issues that affect this component.
67
+ tags: # Handling for tags, labels, or toggles associated with source Issues.
68
+ _include: # The tags, labels, or toggles that trigger inclusion in the release history.
69
+ - highlight
70
+ - deprecation
71
+ - removal
72
+ - breaking
73
+ - experimental
74
+ - changelog
75
+ _exclude: # The list of tags that cause a change/issue to be excluded from the release history.
76
+ highlight: # The tag, label, or toggle that indicates an issue is to be highlighted or prioritized in sorts.
77
+ head: Highlights # How this tag will display as a grouping title.
78
+ text: highlight # How this tag will display as a label.
79
+ slug: highlighted # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
80
+ icon: star # The icon to use for issues so-tagged.
81
+ drop: false # Whether to drop this tag when creating a RHYML object from API source.
82
+ groupable: true # Whether this tag can be used to group issues in the release history.
83
+ breaking: # The tag, label, or toggle that indicates a potentially disruptive change.
84
+ head: Breaking Changes # How this tag will display as a grouping title.
85
+ text: Breaking # How this tag will display as a label.
86
+ slug: breaking # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
87
+ icon: exclamation-triangle # The icon to use for issues so-tagged.
88
+ drop: false # Whether to drop this tag when creating a RHYML object from API source.
89
+ groupable: true # Whether this tag can be used to group issues in the release history.
90
+ removal: # The tag, label, or toggle that indicates a change includes a feature removal.
91
+ head: Feature Removals # How this tag will display as a grouping title.
92
+ text: Removed # How this tag will display as a label.
93
+ slug: removal # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
94
+ icon: sign-out # The icon to use for issues so-tagged.
95
+ drop: false # Whether to drop this tag when creating a RHYML object from API source.
96
+ groupable: true # Whether this tag can be used to group issues in the release history.
97
+ deprecation: # The tag, label, or toggle that indicates an issue includes a feature discontinuation announcement.
98
+ head: Deprecations # How this tag will display as a grouping title.
99
+ text: Deprecated # How this tag will display as a label.
100
+ slug: deprecation # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
101
+ icon: exclamation-triangle # The icon to use for issues so-tagged.
102
+ drop: false # Whether to drop this tag when creating a RHYML object from API source.
103
+ groupable: true # Whether this tag can be used to group issues in the release history.
104
+ security: # The tag, label, or toggle that indicates a change includes a security-related alteration.
105
+ head: Security Fixes # How this tag will display as a grouping title.
106
+ text: Security # How this tag will display as a label.
107
+ slug: security # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
108
+ icon: shield # The icon to use for issues so-tagged.
109
+ drop: false # Whether to drop this tag when creating a RHYML object from API source.
110
+ groupable: true # Whether this tag can be used to group issues in the release history.
111
+ experimental: # The tag, label, or toggle that indicates a feature that is not yet stable or may not be permanent.
112
+ head: Experimental Features # How this tag will display as a grouping title.
113
+ text: Experimental # How this tag will display as a label.
114
+ slug: experimental # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
115
+ icon: flask # The icon to use for issues so-tagged.
116
+ drop: false # Whether to drop this tag when creating a RHYML object from API source.
117
+ groupable: true # Whether this tag can be used to group issues in the release history.
118
+ internal: # The tag, label, or toggle that indicates an issue documents a feature that is not intended for "public" use or...
119
+ head: Internal Changes # How this tag will display as a grouping title.
120
+ text: Internal # How this tag will display as a label.
121
+ slug: internal # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
122
+ icon: lock # The icon to use for issues so-tagged.
123
+ drop: false # Whether to drop this tag when creating a RHYML object from API source.
124
+ groupable: true # Whether this tag can be used to group issues in the release history.
125
+ changelog: # The tag, label, or toggle that indicates an issue should appear in the Changelog even if it does not have...
126
+ slug: changelog # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
127
+ drop: true # Whether to drop this tag when creating a RHYML object from API source.
128
+ groupable: false # Whether this tag can be used to group issues in the release history.
129
+ release_note_needed: # The tag, label, or toggle that indicates an issue requires a release note to be written. This is used by...
130
+ slug: release_note_needed # The literal string used in the Issues system for tagging or labeling an issue to be handled, if different than...
131
+ drop: true # Whether to drop this tag when creating a RHYML object from API source.
132
+ groupable: false # Whether this tag can be used to group issues in the release history.
133
+ # <your_tag_name>: # Unlimited custom tags of your choosing, associated with a tag, label, or toggle in the Issues system or manually assignable...
134
+ # head: # How this tag will display as a grouping title.
135
+ # text: # How this tag will display as a label.
136
+ # icon: # The icon to use for issues so-tagged.
137
+ # drop: # Whether to drop this tag when creating a RHYML object from API source.
138
+ # groupable: # Whether this tag can be used to group issues in the release history.
139
+ links: # Path templates and other metadata for building links to online references like issues (web) and commits (git).
140
+ web: # Properties to enable linking to issue-management system ticket URLs corresponding to individual changes.
141
+ # href: | # The URL template for the links to the issue-management system ticket URL.
142
+ icon: ticket # The icon to use for the issue links.Liquid error: wrong number of arguments (given 3, expected 1..2)
143
+ git: # Properties to enable linking to the Git commit URL corresponding to individual changes.
144
+ # href: | # The URL template for the git links in the release history listings.
145
+ icon: code-fork # The icon to use for the git links.Liquid error: wrong number of arguments (given 3, expected 1..2)
146
+ user:
147
+ # href: | # A template for forming links to bio or homepages for the lead contributor of a change.
148
+ icon: user # The icon to use for the user links.Liquid error: wrong number of arguments (given 3, expected 1..2)
149
+ get: # Properties to enable linking to the download or installation instructions for the release.
150
+ # href: | # The URL template for the release download page.
151
+ icon: download # The icon to use for the download links.Liquid error: wrong number of arguments (given 3, expected 1..2)
152
+ paths: # The configuration for the paths to include in the release history listings.
153
+ drafts_dir: _drafts # The path to the output directory for generated drafts (YAML, Markdown, AsciiDoc).
154
+ enrich_dir: _publish # The path to the output directory for enriched files (HTML, PDF).
155
+ output_dir: . # The base directory from which any other output paths are relative.Liquid error: wrong number of arguments (given 3, expected 1..2)Liquid error: wrong number of arguments (given 3, expected 1..2)
156
+ payloads_dir: _payloads # The path to the directory for storing API payloads.
157
+ cache: # Settings for the ReleaseHx application cache.
158
+ enabled: false # Enable automatic caching of API responses to improve performance and reduce API calls.
159
+ ttl_hours: 24 # Time-to-live for cached API responses in hours.
160
+ dir: .releasehx/cache # The directory where cached API responses are stored.
161
+ prompt_gitignore: true # Quietly check the project's git status after writing to cache and, if cache is found untracked, suggest adding this cache...
162
+ templates_dir: _templates # The path to the templates directory.
163
+ mappings_dir: _mappings # The path to the directory containing user-defined API mappings.
164
+ api_clients_dir: _apis # The path to the directory containing user-defined API client definitions.
165
+ modes: # Default settings for rhx command executions.
166
+ wrapped: false # Include (or exclude) head, header, and footer elements when enriching to HTML.
167
+ html_frontmatter: true # Include frontmatter in the rendered HTML.
168
+ markdown_frontmatter: false # Include frontmatter in Markdown drafts.
169
+ # asciidoc_frontmatter: # Include frontmatter in AsciiDoc drafts.
170
+ fetch: notes-only # What to fetch when gathering issues from API.
171
+ remove_excess_lines: 1 # Reduces N+ consecutive blank lines to N lines.
172
+ rhyml: # Settings related to RHYML data objects and documents.
173
+ markup: markdown # The markup format for the note or memo properties of RHYML objects.Liquid error: wrong number of arguments (given 3, expected 1..2)
174
+ empty_notes: skip # What to do for issues that lack a release note but have the releasenoteneeded tag (or a label otherwise declared...
175
+ empty_notes_content: RELEASE NOTE NEEDED # The content to use for empty notes when <<confpptyrhymlemptynotes>> is set to 'empty'
176
+ max_parts: 1 # The maximum number of affected part categories that can be recorded for a single change.
177
+ pasterize_summ: false # Whether to convert verbs in the summ property to past tense when drafting.
178
+ pasterize_head: false # Whether to convert verbs in the head property to past tense when drafting.
179
+ history: # Configurations for the overall document, when applicable.Liquid error: wrong number of arguments (given 3, expected 1..2)
180
+ htag: h1 # The heading level (H1, H2, etc) for the release history header.Liquid error: wrong number of arguments (given 3, expected 1..2)Liquid error: wrong number of arguments (given 3, expected 1..2)Liquid error: wrong number of arguments (given 3, expected 1..2)
181
+ items: # Settings pertaining to displayed items across Changelog and Release Notes sections.
182
+ allow_redundant: false # Whether to allow duplicate entries in a given section, for instance across groups for part:group sorts where a change affects...
183
+ show_issue_links: false # Whether to include web links in item metadata.
184
+ show_git_links: false # Whether to include git links in item metadata.
185
+ metadata_labels: before # If and where to display icons in relation to labels in item metadata.
186
+ metadata_icons: before # Whether to include icons for metadata in item metadata.
187
+ show_lead: false # Whether to include the lead-in text for the section in the item metadata.
188
+ show_type_label: false # Whether to show the type label in the item metadata output.
189
+ show_parts_label: false # Whether to show the parts label in the item metadata output.
190
+ show_tags_label: false # Whether to show the tags label in the item metadata output.
191
+ show_lead_label: false # Whether to show the lead label in the item metadata output.
192
+ show_auths_label: false # Whether to show the authors label in the item metadata output.
193
+ labeling: # Settings for labeling items in the release history output.
194
+ singularize_labels: true # Whether to singularize labels in the output when only one instance of the category is present.
195
+ type_label: type # The label to use for the type of change.
196
+ # type_icon: # The icon to use for the type of change.
197
+ parts_label: Components # The label to use for the part/component affected by the change.
198
+ part_label: Part # The label to use for the singular part/component affected by the change, when only one part is permitted.
199
+ parts_icon: puzzle-piece # The icon to use for the part/component affected by the change.
200
+ tags_label: # The tags associated with the change, if any.
201
+ - Tags
202
+ tag_label: Tag # The label to use for the singular tag associated with the change, when only one tag is permitted.
203
+ tags_icon: tags # The icon to use for the tags associated with the change.
204
+ lead_label: Contributed by # The label to use for the lead contributor of the change.
205
+ lead_icon: user # The icon to use for the lead contributor of the change.
206
+ auths_label: Contributors # The label to use for the authors of the change.
207
+ # auth_label: # The label to use for the singular author of the change, when only one author is listed and <<confpptyhistorylabelingsingularizelabels>> is...
208
+ join_string: , # The string to use to join multiple tags, parts, or authors in the output.
209
+ changelog: # The configuration for the changelog output.
210
+ head: Changelog # The header for the changelog output.Liquid error: wrong number of arguments (given 3, expected 1..2)
211
+ htag: h2 # The heading level (H1, H2, etc) for the changelog section header.
212
+ spot: 2 # Where in the document to place the changelog (1 = top, 2 = bottom).
213
+ sort: # The sort order for the changelog output.
214
+ - part:grouping1
215
+ items: # Settings that affect the frame/shape and arrangement of individual changelog entries.
216
+ frame: unordered # The layout for the changelog entry display.
217
+ allow_redundant: false # Whether to allow duplicate entries in a given section, for instance across groups for part:group sorts where a change affects...
218
+ show_git_links: false # Whether to include git links in item metadata.
219
+ show_issue_links: false # Whether to include web links in item metadata.
220
+ metadata_labels: before # If and where to display icons in relation to labels in item metadata.
221
+ metadata_icons: before # Whether to include icons for metadata in item metadata.
222
+ show_lead: false # Whether to include the lead-in text for the section in the item metadata.
223
+ show_type_label: false # Whether to show the type label in the item metadata output.
224
+ show_parts_label: false # Whether to show the parts label in the item metadata output.
225
+ show_tags_label: false # Whether to show the tags label in the item metadata output.
226
+ show_lead_label: false # Whether to show the lead label in the item metadata output.
227
+ show_auths_label: false # Whether to show the authors label in the item metadata output.
228
+ notes: # The configuration for the Release Notes listing section.
229
+ head: Release Notes # The header for the notes output.Liquid error: wrong number of arguments (given 3, expected 1..2)
230
+ htag: h2 # The heading level (H1, H2, etc) for the release notes section header.
231
+ spot: 1 # Where in the document to place the Release Notes relative to the Changelog.
232
+ sort: # The sort order for the release notes output.
233
+ - highlight:grouping1
234
+ - deprecation:grouping1
235
+ - removal:grouping1
236
+ - breaking:grouping1
237
+ - type:grouping1
238
+ - part:grouping2
239
+ items: # Settings that affect the frame/shape and arrangement of individual release-note item displays.
240
+ frame: table-cols-1 # The layout for the release-note item display.
241
+ allow_redundant: false # Whether to allow duplicate entries in a given section, for instance across groups for part:group sorts where a change affects...
242
+ show_git_links: false # Whether to include git links in item metadata.
243
+ show_issue_links: false # Whether to include web links in item metadata.
244
+ metadata_labels: before # If and where to display icons in relation to labels in item metadata.
245
+ metadata_icons: before # Whether to include icons for metadata in item metadata.
246
+ show_lead: false # Whether to include the lead-in text for the section in the item metadata.
247
+ show_type_label: false # Whether to show the type label in the item metadata output.
248
+ show_parts_label: false # Whether to show the parts label in the item metadata output.
249
+ show_tags_label: false # Whether to show the tags label in the item metadata output.
250
+ show_lead_label: false # Whether to show the lead label in the item metadata output.
251
+ show_auths_label: false # Whether to show the authors label in the item metadata output.
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../docopslab/mcp/manifest'
4
+
5
+ module ReleaseHx
6
+ module MCP
7
+ # Loads MCP resource and tool definitions from a YAML manifest.
8
+ class Manifest < DocOpsLab::MCP::Manifest
9
+ def self.load path = default_path
10
+ super
11
+ end
12
+
13
+ def self.default_path
14
+ File.expand_path('../../../specs/data/mcp-manifest.yml', __dir__)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../docopslab/mcp/resource_pack'
4
+ require_relative 'manifest'
5
+
6
+ module ReleaseHx
7
+ module MCP
8
+ # Resolves MCP resources from a YAML manifest and packaged assets.
9
+ class ResourcePack < DocOpsLab::MCP::ResourcePack
10
+ def initialize manifest: Manifest.load, asset_root: default_asset_root
11
+ super
12
+ end
13
+
14
+ def reference_json_path
15
+ resource = find('releasehx://config/reference.json')
16
+ resource&.path
17
+ end
18
+
19
+ private
20
+
21
+ def default_asset_root
22
+ File.expand_path('assets', __dir__)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'json'
4
+ require_relative '../../schemagraphy'
5
+ require_relative '../../docopslab/mcp/server'
6
+ require_relative 'manifest'
7
+ require_relative 'resource_pack'
8
+
9
+ module ReleaseHx
10
+ module MCP
11
+ # Hosts MCP resources and tools for configuration discovery.
12
+ class Server < DocOpsLab::MCP::Server
13
+ def initialize manifest: Manifest.load, resource_pack: nil
14
+ @manifest = manifest
15
+ @resource_pack = resource_pack || ResourcePack.new(manifest: @manifest)
16
+ @reference = build_reference
17
+ super(
18
+ name: 'releasehx-mcp',
19
+ manifest: @manifest,
20
+ resource_pack: @resource_pack,
21
+ tool_handler: method(:handle_tool))
22
+ end
23
+
24
+ private
25
+
26
+ def build_reference
27
+ json_path = @resource_pack.reference_json_path
28
+ return nil unless json_path && File.exist?(json_path)
29
+
30
+ SchemaGraphy::CFGYML::PathReference.load(json_path)
31
+ end
32
+
33
+ def handle_tool name, args, _server_context
34
+ case name
35
+ when 'config.reference.get'
36
+ handle_reference_get(args)
37
+ else
38
+ raise ArgumentError, "Unknown MCP tool: #{name}"
39
+ end
40
+ end
41
+
42
+ def handle_reference_get args
43
+ raise ArgumentError, 'Reference JSON not available' unless @reference
44
+
45
+ pointer = args[:pointer] || args['pointer']
46
+ raise ArgumentError, 'Missing JSON Pointer value' if pointer.nil? || pointer == ''
47
+
48
+ result = @reference.get(pointer)
49
+ ::MCP::Tool::Response.new(
50
+ [{ type: 'text', text: JSON.generate(result) }],
51
+ structured_content: result)
52
+ rescue KeyError => e
53
+ ::MCP::Tool::Response.new([{ type: 'text', text: e.message }], error: true)
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../docopslab/mcp'
4
+ require_relative 'mcp/manifest'
5
+ require_relative 'mcp/asset_packager'
6
+ require_relative 'mcp/resource_pack'
7
+ require_relative 'mcp/server'
@@ -0,0 +1,136 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ReleaseHx
4
+ # Provides validation and reporting methods for Release content quality checks.
5
+ #
6
+ # The CheckOps module contains utilities for verifying Release completeness,
7
+ # particularly focused on ensuring required release notes are present for
8
+ # issues that demand them based on configured tag requirements.
9
+ module CheckOps
10
+ # Extracts a value from structured data using the specified path and query language.
11
+ #
12
+ # Supports multiple path query languages including JMESPath for complex JSON
13
+ # navigation and basic hash key lookup for simple access patterns.
14
+ #
15
+ # @param data [Hash, Array] The structured data to query.
16
+ # @param path [String] The path expression for locating the target value.
17
+ # @param lang [String] The query language to use ('jmespath', 'jsonpath', or default hash lookup).
18
+ # @return [Object, nil] The extracted value or nil if path is invalid or value not found.
19
+ def self.extract_value data, path, lang
20
+ return nil unless path.is_a?(String) && !path.empty?
21
+
22
+ case lang.downcase
23
+ when 'jmespath'
24
+ JMESPath.search(path, data)
25
+ when 'jsonpath'
26
+ JsonPath.new(path).on(data)
27
+ else
28
+ data[path]
29
+ end
30
+ end
31
+
32
+ # Prints a comprehensive summary report of release note completeness.
33
+ #
34
+ # Displays statistics about the Release including issue counts, note coverage,
35
+ # and detailed lists of any issues missing required release notes.
36
+ #
37
+ # @param release [Release] The Release object to report on.
38
+ # @param raw_issues_count [Integer] Total number of issues fetched from the API.
39
+ # @param payload [Hash, Array] The original API payload data.
40
+ # @param config [Hash] The configuration hash containing tag settings.
41
+ # @param mapping [Hash] The field mapping configuration for data extraction.
42
+ # @return [void]
43
+ def self.print_check_summary release, raw_issues_count, payload, config, mapping
44
+ missing_issues = find_missing_note_issues(release, payload, config, mapping)
45
+
46
+ puts
47
+ puts 'Release Note Check Report'
48
+ puts
49
+ puts "• Release Code: #{release.code}"
50
+ puts "• Issues Fetched: #{raw_issues_count}"
51
+ puts "• Viable Issues: #{release.changes.size}"
52
+ puts "• Notes Present: #{release.changes.count { |c| c.note.to_s.strip != '' }}"
53
+ puts "• Missing Notes: #{missing_issues.size}"
54
+
55
+ if missing_issues.any?
56
+ print_issue_list('Missing required release notes:', missing_issues, config, mapping)
57
+ else
58
+ puts
59
+ puts 'No missing release notes!'
60
+ end
61
+ puts
62
+ end
63
+
64
+ # Identifies issues that require release notes but are missing them.
65
+ #
66
+ # Searches the original payload for issues tagged with the release note requirement,
67
+ # then cross-references with Changes that already have notes to find gaps.
68
+ #
69
+ # @param release [Release] The Release object containing processed Changes.
70
+ # @param payload [Hash, Array] The original API payload data.
71
+ # @param config [Hash] The configuration hash containing tag settings.
72
+ # @param mapping [Hash] The field mapping configuration for data extraction.
73
+ # @return [Array<Hash>] Array of issue objects missing required release notes.
74
+ def self.find_missing_note_issues release, payload, config, mapping
75
+ # Extract release note requirement configuration
76
+ tag_config = config['tags'] || {}
77
+ rn_tag_key = 'release_note_needed'
78
+ rn_slug = tag_config.dig(rn_tag_key, 'slug')&.downcase || rn_tag_key.downcase
79
+
80
+ # Configure data extraction paths
81
+ tick_path = mapping.dig('tick', 'path') || 'number'
82
+ tags_path = mapping.dig('tags', 'path') || 'labels[].name'
83
+ path_lang = mapping.dig('$config', 'path_lang') || 'jmespath'
84
+
85
+ # Find issues tagged as requiring release notes
86
+ payload_items = payload.is_a?(Array) ? payload : payload['issues'] || payload.values
87
+ rn_issues = payload_items.select do |item|
88
+ tags = extract_value(item, tags_path, path_lang)
89
+ tags = tags.is_a?(Array) ? tags.map(&:downcase) : Array(tags).map(&:downcase)
90
+ tags.include?(rn_slug)
91
+ end
92
+
93
+ # Get ticket IDs that already have notes
94
+ noted_ticks = release.changes.reject { |c| c.note.to_s.strip == '' }.map(&:tick)
95
+
96
+ # Return issues that need notes but don't have them
97
+ rn_issues.reject do |item|
98
+ tick = extract_value(item, tick_path, path_lang)
99
+ noted_ticks.include?(tick)
100
+ end
101
+ end
102
+
103
+ # Prints a formatted list of issues with extracted metadata.
104
+ #
105
+ # Displays issues in a consistent format with ticket IDs, summaries, and
106
+ # assignee information, using API-specific formatting conventions.
107
+ #
108
+ # @param title [String] The header title for the issue list.
109
+ # @param issues [Array<Hash>] Array of issue objects to display.
110
+ # @param config [Hash] The configuration hash for API type detection.
111
+ # @param mapping [Hash] The field mapping configuration for data extraction.
112
+ # @return [void]
113
+ def self.print_issue_list title, issues, config, mapping
114
+ puts
115
+ puts title
116
+
117
+ # Configure extraction paths for issue metadata
118
+ tick_path = mapping.dig('tick', 'path') || 'number'
119
+ summ_path = mapping.dig('summ', 'path') || 'title'
120
+ lead_path = mapping.dig('lead', 'path') || 'assignee.login'
121
+ path_lang = mapping.dig('$config', 'path_lang') || 'jmespath'
122
+ api_type = config.dig('source', 'type')&.downcase || 'unknown'
123
+
124
+ issues.each do |issue|
125
+ tick = extract_value(issue, tick_path, path_lang)
126
+ summ = extract_value(issue, summ_path, path_lang)
127
+ lead = extract_value(issue, lead_path, path_lang)
128
+
129
+ # Format ticket display based on API type conventions
130
+ tick_display = api_type == 'jira' ? tick.to_s : "##{tick}"
131
+ lead_display = lead ? " (#{lead})" : ''
132
+ puts " - #{tick_display}: #{summ}#{lead_display}"
133
+ end
134
+ end
135
+ end
136
+ end