releasehx 0.1.2 → 0.2.1
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 +4 -4
- data/README.adoc +376 -337
- data/build/docs/_config.yml +4 -1
- data/build/docs/_release_index.adoc +16 -5
- data/build/docs/config-reference.adoc +197 -10
- data/build/docs/config-reference.json +56 -7
- data/build/docs/index.adoc +377 -337
- data/build/docs/landing.adoc +1 -1
- data/build/docs/manpage.adoc +2 -2
- data/build/docs/release-procedure.adoc +371 -0
- data/build/docs/release-procedure.html +88 -0
- data/build/docs/releasehx.1 +17 -5
- data/build/docs/sample-config.yml +14 -7
- data/lib/releasehx/cli.rb +5 -2
- data/lib/releasehx/configuration.rb +0 -1
- data/lib/releasehx/generated.rb +1 -1
- data/lib/releasehx/mcp/assets/agent-config-guide.md +1 -1
- data/lib/releasehx/mcp/assets/config-def.yml +122 -6
- data/lib/releasehx/mcp/assets/config-reference.adoc +197 -10
- data/lib/releasehx/mcp/assets/config-reference.json +56 -7
- data/lib/releasehx/mcp/assets/sample-config.yml +14 -7
- data/lib/releasehx/mcp/server.rb +0 -1
- data/lib/releasehx/ops/enrich_ops.rb +161 -55
- data/lib/releasehx/ops/template_ops.rb +1 -1
- data/lib/releasehx/rhyml/adapter.rb +0 -3
- data/lib/releasehx/rhyml/templates/bootstrap-overrides.css +15 -0
- data/lib/releasehx/rhyml/templates/changelog.adoc.liquid +2 -0
- data/lib/releasehx/rhyml/templates/changelog.html.liquid +6 -4
- data/lib/releasehx/rhyml/templates/changelog.md.liquid +1 -0
- data/lib/releasehx/rhyml/templates/embedded.css.liquid +263 -0
- data/lib/releasehx/rhyml/templates/entry.adoc.liquid +1 -0
- data/lib/releasehx/rhyml/templates/entry.html.liquid +21 -20
- data/lib/releasehx/rhyml/templates/entry.md.liquid +15 -21
- data/lib/releasehx/rhyml/templates/head-parser.liquid +6 -2
- data/lib/releasehx/rhyml/templates/header.liquid +13 -4
- data/lib/releasehx/rhyml/templates/history.html.liquid +152 -33
- data/lib/releasehx/rhyml/templates/metadata-entry.adoc.liquid +83 -38
- data/lib/releasehx/rhyml/templates/metadata-entry.html.liquid +60 -1
- data/lib/releasehx/rhyml/templates/metadata-entry.md.liquid +65 -113
- data/lib/releasehx/rhyml/templates/metadata-note.adoc.liquid +83 -38
- data/lib/releasehx/rhyml/templates/metadata-note.html.liquid +59 -22
- data/lib/releasehx/rhyml/templates/metadata-note.md.liquid +68 -23
- data/lib/releasehx/rhyml/templates/note.html.liquid +25 -19
- data/lib/releasehx/rhyml/templates/note.md.liquid +44 -26
- data/lib/releasehx/rhyml/templates/release-notes.adoc.liquid +2 -0
- data/lib/releasehx/rhyml/templates/release-notes.html.liquid +6 -4
- data/lib/releasehx/rhyml/templates/release-notes.md.liquid +1 -0
- data/lib/releasehx/rhyml/templates/release.adoc.liquid +2 -0
- data/lib/releasehx/rhyml/templates/release.md.liquid +8 -7
- data/lib/releasehx/rhyml/templates/rhyml-change.yaml.liquid +39 -39
- data/lib/releasehx/rhyml/templates/wrapper.html.liquid +103 -0
- data/lib/releasehx/sgyml/helpers.rb +0 -2
- data/lib/releasehx/transforms/adf_to_markdown.rb +1 -1
- data/lib/releasehx/version.rb +0 -2
- data/lib/releasehx.rb +2 -2
- data/specs/data/config-def.yml +122 -6
- metadata +48 -25
- data/build/docs/schemagraphy_readme.html +0 -0
- data/build/docs/sourcerer_readme.html +0 -46
- data/lib/schemagraphy/attribute_resolver.rb +0 -48
- data/lib/schemagraphy/cfgyml/definition.rb +0 -90
- data/lib/schemagraphy/cfgyml/doc_builder.rb +0 -52
- data/lib/schemagraphy/cfgyml/path_reference.rb +0 -24
- data/lib/schemagraphy/data_query/json_pointer.rb +0 -42
- data/lib/schemagraphy/loader.rb +0 -59
- data/lib/schemagraphy/regexp_utils.rb +0 -235
- data/lib/schemagraphy/safe_expression.rb +0 -189
- data/lib/schemagraphy/schema_utils.rb +0 -124
- data/lib/schemagraphy/tag_utils.rb +0 -32
- data/lib/schemagraphy/templating.rb +0 -104
- data/lib/schemagraphy.rb +0 -17
- data/lib/sourcerer/builder.rb +0 -120
- data/lib/sourcerer/jekyll/bootstrapper.rb +0 -78
- data/lib/sourcerer/jekyll/liquid/file_system.rb +0 -74
- data/lib/sourcerer/jekyll/liquid/filters.rb +0 -215
- data/lib/sourcerer/jekyll/liquid/tags.rb +0 -44
- data/lib/sourcerer/jekyll/monkeypatches.rb +0 -73
- data/lib/sourcerer/jekyll.rb +0 -26
- data/lib/sourcerer/plaintext_converter.rb +0 -75
- data/lib/sourcerer/templating.rb +0 -190
- data/lib/sourcerer.rb +0 -322
data/build/docs/index.adoc
CHANGED
|
@@ -1,28 +1,66 @@
|
|
|
1
1
|
:page-layout: default
|
|
2
2
|
:page-permalink: /docs/
|
|
3
3
|
:page-title: ReleaseHx Docs
|
|
4
|
+
:page-permalink: /docs/
|
|
5
|
+
:page-title: ReleaseHx Docs
|
|
4
6
|
:page-nav_order: 1
|
|
5
|
-
[[releasehx]]
|
|
6
7
|
= ReleaseHx
|
|
7
8
|
// tag::ai-prompt[]
|
|
8
9
|
// Collects AsciiDoc content for presenting to a generative AI prompt
|
|
9
10
|
// Other AI-only prompt matter could go here
|
|
10
|
-
// tag::
|
|
11
|
-
:
|
|
12
|
-
:
|
|
13
|
-
|
|
14
|
-
:
|
|
15
|
-
|
|
11
|
+
// tag::global-settings[]
|
|
12
|
+
:this_proj_slug: releasehx
|
|
13
|
+
:this_proj_name: ReleaseHx
|
|
14
|
+
// tag::universal-settings[]
|
|
15
|
+
// ALL changes within this block must be made in prime template:
|
|
16
|
+
// DocOps/lab/gems/docopslab-dev/templates/README.asciidoc
|
|
17
|
+
:docopslab_src_www_url: https://github.com/DocOps
|
|
18
|
+
:docopslab_domain: docopslab.org
|
|
19
|
+
:docopslab_www_url: https://{docopslab_domain}
|
|
20
|
+
:docopslab_io_www_url: https://docopslab.github.io
|
|
21
|
+
:docopslab_ruby_version: 3.2.7
|
|
22
|
+
:docopslab_git_src_uri: git@github.com:DocOps
|
|
23
|
+
:docopslab_src_raw_url: https://raw.githubusercontent.com/DocOps
|
|
24
|
+
:this_proj_src_www_url: {docopslab_src_www_url}/{this_proj_slug}
|
|
25
|
+
:this_proj_src_raw_url: {docopslab_src_raw_url}/{this_proj_slug}
|
|
26
|
+
:this_proj_src_main_raw_url: {this_proj_src_raw_url}/main
|
|
27
|
+
:this_proj_src_main_files_url: {this_proj_src_www_url}/blob/main
|
|
28
|
+
:this_proj_src_git_uri: {docopslab_git_src_uri}/{this_proj_slug}.git
|
|
29
|
+
:this_proj_ruby_version: {docopslab_ruby_version}
|
|
30
|
+
// tag::env-settings[]
|
|
31
|
+
:docs_extn:
|
|
32
|
+
ifdef::env-github[]
|
|
33
|
+
:docs_extn: .adoc
|
|
34
|
+
:icons: font
|
|
35
|
+
:caution-caption: :fire:
|
|
36
|
+
:important-caption: :exclamation:
|
|
37
|
+
:note-caption: :paperclip:
|
|
38
|
+
:tip-caption: :bulb:
|
|
39
|
+
:warning-caption: :warning:
|
|
40
|
+
endif::[]
|
|
41
|
+
// end::env-settings[]
|
|
42
|
+
// Settings likely to be overridden locally
|
|
43
|
+
:this_prod_slug: {this_proj_slug}
|
|
44
|
+
:this_prod_name: {this_proj_name}
|
|
45
|
+
:this_prod_src_www_url: {this_proj_src_www_url}
|
|
46
|
+
// end::universal-settings[]
|
|
47
|
+
:releasehx-demo_repo_www_url: {docopslab_src_www_url}/releasehx-demo
|
|
48
|
+
// tag::product-settings[]
|
|
49
|
+
:this_prod_slug: {this_proj_slug}
|
|
50
|
+
// tag::version-settings[]
|
|
16
51
|
:this_prod_vrsn_major: 0
|
|
17
|
-
:this_prod_vrsn_minor:
|
|
18
|
-
:
|
|
19
|
-
:this_prod_vrsn_patch:
|
|
20
|
-
:this_prod_vrsn: {
|
|
21
|
-
:next_prod_vrsn: 0.
|
|
52
|
+
:this_prod_vrsn_minor: 2
|
|
53
|
+
:this_prod_vrsn_majmin: {this_prod_vrsn_major}.{this_prod_vrsn_minor}
|
|
54
|
+
:this_prod_vrsn_patch: 1
|
|
55
|
+
:this_prod_vrsn: {this_prod_vrsn_majmin}.{this_prod_vrsn_patch}
|
|
56
|
+
:next_prod_vrsn: 0.3.0
|
|
57
|
+
:next_prod_vrsn_majmin: 0.3
|
|
58
|
+
// end::version-settings[]
|
|
22
59
|
:tagline: Generate formatted release histories from Jira, GitHub, GitLab, YAML, or JSON sources.
|
|
23
60
|
:description: pass:q[CLI utility and Ruby API for generating structured release notes and changelog documents from various issue-tracking platforms or YAML definitions into plaintext drafts (*AsciiDoc*, *Markdown*, *YAML*) and rich-text output (*HTML* and *PDF*).]
|
|
24
61
|
:gem_config_definition_path: ./specs/data/config-def.yml
|
|
25
62
|
:app_default_config_path: ./.releasehx.yml
|
|
63
|
+
:docker_run_command: docker run -it --rm --user $(id -u):$(id -g) -v $(pwd):/workdir docopslab/{this_prod_slug} rhx
|
|
26
64
|
// Default configuration values - single source of truth for config-def.yml
|
|
27
65
|
:default_markup: markdown
|
|
28
66
|
:default_slug_type: kebab
|
|
@@ -46,19 +84,10 @@
|
|
|
46
84
|
:draft_source_extensions: {markdown_extensions}, {asciidoc_extensions}, {yaml_extensions}
|
|
47
85
|
:enrich_file_types: HTML, PDF
|
|
48
86
|
:enrich_extensions: .html, .pdf
|
|
49
|
-
|
|
50
|
-
:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
:releasehx_www: https://releasehx.docopslab.org
|
|
54
|
-
:releasehx_docs_www: {releasehx_www}/docs
|
|
55
|
-
:default-config_www: {releasehx_docs_www}/sample-config.html
|
|
56
|
-
:this_prod_docs_www: {releasehx_docs_www}
|
|
57
|
-
endif::[]
|
|
58
|
-
ifndef::env-github[]
|
|
59
|
-
:docs_extn:
|
|
60
|
-
endif::[]
|
|
61
|
-
// end::globals[]
|
|
87
|
+
// end::product-settings[]
|
|
88
|
+
:asciisourcerer_www_url: {docopslab_src_www_url}/asciisourcerer
|
|
89
|
+
:schemagraphy_www_url: {docopslab_src_www_url}/schemagraphy
|
|
90
|
+
// end::global-settings[]
|
|
62
91
|
:toc: macro
|
|
63
92
|
:toclevels: 3
|
|
64
93
|
|
|
@@ -210,7 +239,7 @@ With Docker installed and running...
|
|
|
210
239
|
. Run the `rhx` command.
|
|
211
240
|
+
|
|
212
241
|
[.prompt,subs=+attributes]
|
|
213
|
-
{
|
|
242
|
+
{docker_run_command}
|
|
214
243
|
+
|
|
215
244
|
This mounts your local directory to be writeable by the Docker container.
|
|
216
245
|
Everything after `rhx` accepts the standard <<rhx,arguments and options>> of the ReleaseHx utility.
|
|
@@ -220,7 +249,7 @@ Everything after `rhx` accepts the standard <<rhx,arguments and options>> of the
|
|
|
220
249
|
Optionally alias the base Docker command.
|
|
221
250
|
|
|
222
251
|
[.prompt,subs=+attributes]
|
|
223
|
-
alias rhx='{
|
|
252
|
+
alias rhx='{docker_run_command}'
|
|
224
253
|
====
|
|
225
254
|
|
|
226
255
|
Try the <<demo-setup,demo configs and data>> to get a feel for how ReleaseHx works.
|
|
@@ -266,6 +295,7 @@ It does not provide assistance for command-line actions or other configurations
|
|
|
266
295
|
For your LLM client (such as Copilot, Claude Code, Codex, Cursor, etc) to interact with this service, it must be configured using a general MCP syntax.
|
|
267
296
|
This data is usually added to a `mcp.json` file or another object.
|
|
268
297
|
|
|
298
|
+
// 1. This block is totally fine
|
|
269
299
|
Generic MCP config (global gem install)::
|
|
270
300
|
[source,json]
|
|
271
301
|
----
|
|
@@ -278,12 +308,12 @@ Generic MCP config (global gem install)::
|
|
|
278
308
|
}
|
|
279
309
|
----
|
|
280
310
|
|
|
311
|
+
// 2. This block looks totally fine
|
|
281
312
|
Generic MCP config (Docker)::
|
|
282
313
|
+
|
|
283
|
-
--
|
|
284
314
|
Use the Docker image for maximum compatibility across environments.
|
|
285
|
-
This is the
|
|
286
|
-
|
|
315
|
+
This is the *recommended approach* for most users.
|
|
316
|
+
+
|
|
287
317
|
[source,json]
|
|
288
318
|
----
|
|
289
319
|
{
|
|
@@ -295,13 +325,11 @@ This is the **recommended approach** for most users.
|
|
|
295
325
|
}
|
|
296
326
|
}
|
|
297
327
|
----
|
|
298
|
-
--
|
|
299
328
|
|
|
329
|
+
// 3. The first line on this block is white instead of blue like a DL term designator should be
|
|
300
330
|
VS Code MCP configuration (Docker)::
|
|
301
|
-
+
|
|
302
|
-
--
|
|
303
331
|
Create or update `~/.config/Code/User/mcp.json` (Linux/Mac) or `%APPDATA%\Code\User\mcp.json` (Windows).
|
|
304
|
-
|
|
332
|
+
+
|
|
305
333
|
[source,json]
|
|
306
334
|
----
|
|
307
335
|
{
|
|
@@ -313,13 +341,11 @@ Create or update `~/.config/Code/User/mcp.json` (Linux/Mac) or `%APPDATA%\Code\U
|
|
|
313
341
|
}
|
|
314
342
|
}
|
|
315
343
|
----
|
|
316
|
-
--
|
|
317
344
|
|
|
345
|
+
// 4.This and all the following blocks are improperly highlighted
|
|
318
346
|
VS Code MCP configuration (global gem install)::
|
|
319
|
-
+
|
|
320
|
-
--
|
|
321
347
|
If you have ReleaseHx installed globally (`gem install releasehx`), you can use this simpler configuration:
|
|
322
|
-
|
|
348
|
+
+
|
|
323
349
|
[source,json]
|
|
324
350
|
----
|
|
325
351
|
{
|
|
@@ -330,7 +356,6 @@ If you have ReleaseHx installed globally (`gem install releasehx`), you can use
|
|
|
330
356
|
}
|
|
331
357
|
}
|
|
332
358
|
----
|
|
333
|
-
--
|
|
334
359
|
|
|
335
360
|
Local repo MCP config (Bundler + cwd)::
|
|
336
361
|
[source,json]
|
|
@@ -411,9 +436,11 @@ Global gem::
|
|
|
411
436
|
|
|
412
437
|
If your MCP server isn't working in VS Code or Copilot:
|
|
413
438
|
|
|
414
|
-
.
|
|
439
|
+
. *Verify Docker image exists.*
|
|
440
|
+
Run `docker images | grep releasehx` to confirm the image is available.
|
|
415
441
|
|
|
416
|
-
.
|
|
442
|
+
. *Test MCP server manually.*
|
|
443
|
+
Run the following to verify the server responds:
|
|
417
444
|
+
|
|
418
445
|
[.prompt]
|
|
419
446
|
----
|
|
@@ -422,11 +449,14 @@ echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":
|
|
|
422
449
|
+
|
|
423
450
|
You should see a JSON response with `"serverInfo":{"name":"releasehx-mcp"}`
|
|
424
451
|
|
|
425
|
-
.
|
|
452
|
+
. *Check VS Code MCP config.*
|
|
453
|
+
Ensure `~/.config/Code/User/mcp.json` exists and uses the correct command format (see examples above).
|
|
426
454
|
|
|
427
|
-
.
|
|
455
|
+
. *Restart VS Code.*
|
|
456
|
+
After changing `mcp.json`, restart VS Code completely for changes to take effect.
|
|
428
457
|
|
|
429
|
-
|
|
458
|
+
*Check VS Code logs.*
|
|
459
|
+
Open Output panel (kbd:[Ctrl+Shift+U]) and look for errors related to MCP or the releasehx server.
|
|
430
460
|
|
|
431
461
|
[TIP]
|
|
432
462
|
====
|
|
@@ -437,7 +467,7 @@ Then have it consult `releasehx://config/sample` as a table of contents before u
|
|
|
437
467
|
[[demo-setup]]
|
|
438
468
|
==== Demo Repo Setup
|
|
439
469
|
|
|
440
|
-
If you want to play around with ReleaseHx before connecting it to your own Issues source via API, use the `link:{
|
|
470
|
+
If you want to play around with ReleaseHx before connecting it to your own Issues source via API, use the `link:{releasehx-demo_repo_www_url}[DocOps/releasehx-demo]` repository as instructed in this section.
|
|
441
471
|
|
|
442
472
|
Alternately, skip to <<issue-sources>> to begin configuring your own project/environment.
|
|
443
473
|
|
|
@@ -608,7 +638,7 @@ Out of the box, there are two issues in the `jira-customfield-note-1.1.0.json` f
|
|
|
608
638
|
[.prompt.testable]
|
|
609
639
|
rhx 1.1.0 --config configs/jira-customfield.yml --api-data _payloads/jira-customfield-note-1.1.0.json --html --pdf
|
|
610
640
|
|
|
611
|
-
For more on the demo repo, visit its README at {
|
|
641
|
+
For more on the demo repo, visit its README at {releasehx-demo_repo_www_url}.
|
|
612
642
|
|
|
613
643
|
[[custom-configuration]]
|
|
614
644
|
==== Custom Configuration
|
|
@@ -899,7 +929,7 @@ For *custom field-based* release notes, the entire ADF content in the custom fie
|
|
|
899
929
|
No heading extraction is performed.
|
|
900
930
|
--
|
|
901
931
|
|
|
902
|
-
See link:{
|
|
932
|
+
See link:{releasehx-demo_repo_www_url}[releasehx-demo] repository for working examples with ADF payloads and configurations.
|
|
903
933
|
|
|
904
934
|
[[github-issues]]
|
|
905
935
|
==== GitHub Issues
|
|
@@ -1141,6 +1171,203 @@ Templates replace their namesakes built into the ReleaseHx application or API.
|
|
|
1141
1171
|
By default, ReleaseHx expects templates to be formatted in link:https://shopify.github.io[Liquid], but it uses the Jekyll-enhanced Liquid 4.
|
|
1142
1172
|
See <<templating>> for details.
|
|
1143
1173
|
|
|
1174
|
+
[[styling-customization]]
|
|
1175
|
+
==== HTML Styling and CSS Integration
|
|
1176
|
+
|
|
1177
|
+
ReleaseHx provides multiple approaches for customizing the appearance of HTML output through the `history.styling` configuration section.
|
|
1178
|
+
|
|
1179
|
+
[[styling-modes]]
|
|
1180
|
+
===== Styling Modes
|
|
1181
|
+
|
|
1182
|
+
The `history.styling.mode` property controls how CSS is applied to HTML output:
|
|
1183
|
+
|
|
1184
|
+
`framework` (default)::
|
|
1185
|
+
Uses only the configured CSS framework (Bootstrap, etc.) via CDN links.
|
|
1186
|
+
No additional custom CSS is included.
|
|
1187
|
+
Best for standard, professional appearance with minimal configuration.
|
|
1188
|
+
|
|
1189
|
+
`embedded`::
|
|
1190
|
+
Includes comprehensive CSS directly in the HTML `<style>` block.
|
|
1191
|
+
Generates standalone HTML files that display correctly without external dependencies.
|
|
1192
|
+
Automatically includes framework CSS plus custom theming.
|
|
1193
|
+
Best for distribution and email-friendly HTML.
|
|
1194
|
+
|
|
1195
|
+
`external`::
|
|
1196
|
+
References an external stylesheet via `<link>` tag.
|
|
1197
|
+
Requires `history.styling.css_url` to specify the stylesheet location.
|
|
1198
|
+
Framework CSS is disabled when using external stylesheets.
|
|
1199
|
+
Best for custom branding and when CSS needs to be shared across multiple pages.
|
|
1200
|
+
|
|
1201
|
+
`minimal`::
|
|
1202
|
+
Provides basic semantic styling with minimal inline CSS.
|
|
1203
|
+
No framework dependencies or complex styling.
|
|
1204
|
+
Best for simple, lightweight output or when CSS will be applied by a static site generator.
|
|
1205
|
+
|
|
1206
|
+
[[theme-variants]]
|
|
1207
|
+
===== Theme Variants
|
|
1208
|
+
|
|
1209
|
+
When using `embedded` or `framework` modes, the `history.styling.theme` property controls spacing and typography:
|
|
1210
|
+
|
|
1211
|
+
`default`::
|
|
1212
|
+
Balanced spacing and typography for general use.
|
|
1213
|
+
|
|
1214
|
+
`compact`::
|
|
1215
|
+
Reduced spacing and condensed layout for information-dense displays.
|
|
1216
|
+
Ideal for internal documentation or when screen space is limited.
|
|
1217
|
+
|
|
1218
|
+
`detailed`::
|
|
1219
|
+
Expanded spacing and enhanced typography for presentation contexts.
|
|
1220
|
+
Includes larger headings and more prominent metadata display.
|
|
1221
|
+
|
|
1222
|
+
[[configuration-examples]]
|
|
1223
|
+
===== Configuration Examples
|
|
1224
|
+
|
|
1225
|
+
.Framework Mode with Default Theme
|
|
1226
|
+
[source,yaml]
|
|
1227
|
+
----
|
|
1228
|
+
history:
|
|
1229
|
+
html_framework: bootstrap5
|
|
1230
|
+
styling:
|
|
1231
|
+
mode: framework
|
|
1232
|
+
theme: default
|
|
1233
|
+
----
|
|
1234
|
+
|
|
1235
|
+
.Embedded CSS with Compact Theme
|
|
1236
|
+
[source,yaml]
|
|
1237
|
+
----
|
|
1238
|
+
history:
|
|
1239
|
+
html_framework: bootstrap5
|
|
1240
|
+
styling:
|
|
1241
|
+
mode: embedded
|
|
1242
|
+
theme: compact
|
|
1243
|
+
embed_css: true
|
|
1244
|
+
----
|
|
1245
|
+
|
|
1246
|
+
.External Stylesheet
|
|
1247
|
+
[source,yaml]
|
|
1248
|
+
----
|
|
1249
|
+
history:
|
|
1250
|
+
styling:
|
|
1251
|
+
mode: external
|
|
1252
|
+
css_url: "assets/custom-releasehx.css"
|
|
1253
|
+
----
|
|
1254
|
+
|
|
1255
|
+
.Minimal Styling
|
|
1256
|
+
[source,yaml]
|
|
1257
|
+
----
|
|
1258
|
+
history:
|
|
1259
|
+
styling:
|
|
1260
|
+
mode: minimal
|
|
1261
|
+
----
|
|
1262
|
+
|
|
1263
|
+
[[custom-css-development]]
|
|
1264
|
+
===== Custom CSS Development
|
|
1265
|
+
|
|
1266
|
+
When using `external` mode, create a CSS file that targets ReleaseHx's semantic HTML structure:
|
|
1267
|
+
|
|
1268
|
+
.Key CSS Classes and Elements
|
|
1269
|
+
[source,css]
|
|
1270
|
+
----
|
|
1271
|
+
/* Main containers */
|
|
1272
|
+
.release-history { /* Overall wrapper */ }
|
|
1273
|
+
.release-section { /* Individual release container */ }
|
|
1274
|
+
|
|
1275
|
+
/* Content sections */
|
|
1276
|
+
.changelog-section { /* Changelog entries container */ }
|
|
1277
|
+
.notes-section { /* Release notes container */ }
|
|
1278
|
+
|
|
1279
|
+
/* Individual items */
|
|
1280
|
+
.release-note { /* Individual release note */ }
|
|
1281
|
+
.change-entry { /* Individual changelog entry */ }
|
|
1282
|
+
|
|
1283
|
+
/* Components */
|
|
1284
|
+
.card-header, .card-body, .card-footer { /* Note structure */ }
|
|
1285
|
+
.change-metadata { /* Metadata display container */ }
|
|
1286
|
+
.badge { /* Type/status badges */ }
|
|
1287
|
+
----
|
|
1288
|
+
|
|
1289
|
+
For a complete example, see the `releasehx-custom.css` file in the https://github.com/DocOps/releasehx-demo[releasehx-demo repository].
|
|
1290
|
+
|
|
1291
|
+
[[css-variables]]
|
|
1292
|
+
===== CSS Variables for Easy Customization
|
|
1293
|
+
|
|
1294
|
+
ReleaseHx's embedded CSS uses CSS custom properties for easy theming:
|
|
1295
|
+
|
|
1296
|
+
[source,css]
|
|
1297
|
+
----
|
|
1298
|
+
:root {
|
|
1299
|
+
--release-spacing: 3rem; /* Space between releases */
|
|
1300
|
+
--section-spacing: 2.5rem; /* Space between sections */
|
|
1301
|
+
--item-spacing: 1rem; /* Space between items */
|
|
1302
|
+
--primary-color: #0d6efd; /* Brand primary color */
|
|
1303
|
+
--success-color: #198754; /* Success/changelog color */
|
|
1304
|
+
--info-color: #0dcaf0; /* Info/notes color */
|
|
1305
|
+
}
|
|
1306
|
+
----
|
|
1307
|
+
|
|
1308
|
+
Override these variables in your external CSS to customize the appearance without rewriting the entire stylesheet.
|
|
1309
|
+
|
|
1310
|
+
[[dark-theme]]
|
|
1311
|
+
===== Dark Theme Support
|
|
1312
|
+
|
|
1313
|
+
ReleaseHx's embedded CSS includes comprehensive dark theme support that automatically adapts to user preferences:
|
|
1314
|
+
|
|
1315
|
+
Automatic detection::
|
|
1316
|
+
When using `framework: bootstrap5` mode, ReleaseHx includes a detection script that automatically applies dark theme based on system preferences.
|
|
1317
|
+
The script listens for system theme changes and updates the display in real-time.
|
|
1318
|
+
|
|
1319
|
+
CSS custom properties::
|
|
1320
|
+
Dark theme colors are defined using CSS custom properties within a `@media (prefers-color-scheme: dark)` query.
|
|
1321
|
+
All color values automatically invert for dark mode while maintaining proper contrast ratios.
|
|
1322
|
+
|
|
1323
|
+
Manual override::
|
|
1324
|
+
Users can manually toggle dark mode using the `.dark-theme` class on the `<html>` element.
|
|
1325
|
+
This overrides system preferences for explicit theme control.
|
|
1326
|
+
|
|
1327
|
+
.Dark Theme Configuration Example
|
|
1328
|
+
[source,yaml]
|
|
1329
|
+
----
|
|
1330
|
+
history:
|
|
1331
|
+
html_framework: bootstrap5
|
|
1332
|
+
styling:
|
|
1333
|
+
mode: embedded
|
|
1334
|
+
theme: default
|
|
1335
|
+
----
|
|
1336
|
+
|
|
1337
|
+
When rendered, the HTML will include:
|
|
1338
|
+
|
|
1339
|
+
* Bootstrap 5 with `data-bs-theme` attribute management
|
|
1340
|
+
* CSS custom properties for both light and dark color schemes
|
|
1341
|
+
* JavaScript to detect and respond to system preference changes
|
|
1342
|
+
* Manual theme toggle capability (if you add UI controls)
|
|
1343
|
+
|
|
1344
|
+
.Dark Theme CSS Variables
|
|
1345
|
+
[source,css]
|
|
1346
|
+
----
|
|
1347
|
+
@media (prefers-color-scheme: dark) {
|
|
1348
|
+
:root {
|
|
1349
|
+
--bg-color: #1a1a1a;
|
|
1350
|
+
--text-color: #e0e0e0;
|
|
1351
|
+
--border-color: #444;
|
|
1352
|
+
--card-bg: #2d2d2d;
|
|
1353
|
+
--note-bg: #252525;
|
|
1354
|
+
/* Additional dark theme variables */
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
----
|
|
1358
|
+
|
|
1359
|
+
For examples of dark theme in action, see the demo configurations in the {releasehx-demo_repo_www_url}[releasehx-demo repository], particularly `github-dark-mode.yml` and `github-bootstrap-dark.yml`.
|
|
1360
|
+
|
|
1361
|
+
[[html-wrapper-control]]
|
|
1362
|
+
===== HTML Wrapper Control
|
|
1363
|
+
|
|
1364
|
+
To enable HTML wrapper with CSS, use either:
|
|
1365
|
+
|
|
1366
|
+
* Configuration: `modes.html_wrap: true`
|
|
1367
|
+
* CLI flag: `--wrap`
|
|
1368
|
+
|
|
1369
|
+
The wrapper includes proper HTML document structure, meta tags, and CSS framework loading.
|
|
1370
|
+
|
|
1144
1371
|
[[sourcing-strategy]]
|
|
1145
1372
|
=== Sourcing Strategy
|
|
1146
1373
|
|
|
@@ -1582,7 +1809,7 @@ Writes to `<output_path>/<file_template>` or `<PATH>`.
|
|
|
1582
1809
|
*--wrap, --no-wrap*::
|
|
1583
1810
|
{cli_option_message_wrap}.
|
|
1584
1811
|
When enriching to HTML, _include_ (`--wrap`) or _exclude_ (`--no-wrap`) the `<head>` and `<body>` tags and their content.
|
|
1585
|
-
For use when the opposite value is set in the config file ([.ppty]*<<
|
|
1812
|
+
For use when the opposite value is set in the config file ([.ppty]*<<conf_ppty_modes_html_wrap>>*).
|
|
1586
1813
|
|
|
1587
1814
|
*--quiet*::
|
|
1588
1815
|
{cli_option_message_quiet}.
|
|
@@ -1724,7 +1951,7 @@ Each item must have a `user` property that matches a username in the Issues syst
|
|
|
1724
1951
|
These pertain the to the main configuration file, which is defined specifically for your _application_ of ReleaseHx.
|
|
1725
1952
|
By default, the application config is found at `{app_default_config_path}.`
|
|
1726
1953
|
|
|
1727
|
-
The full configuration reference is published at link:{releasehx_docs_www}/config-reference{
|
|
1954
|
+
The full configuration reference is published at link:{releasehx_docs_www}/config-reference{extn}[].
|
|
1728
1955
|
|
|
1729
1956
|
[[sample-config]]
|
|
1730
1957
|
=== Sample Application Configurations
|
|
@@ -1733,7 +1960,7 @@ ReleaseHx comes with a complete default configuration file as well as a series o
|
|
|
1733
1960
|
|
|
1734
1961
|
The complete link:{default-config_www}[default config file] displays default values with commented descriptions of all available properties.
|
|
1735
1962
|
|
|
1736
|
-
The various sample configurations stored in the link:{
|
|
1963
|
+
The various sample configurations stored in the link:{releasehx-demo_repo_www_url}/blob/main/configs/[demo repository] may be a good start toward establishing your own setup.
|
|
1737
1964
|
|
|
1738
1965
|
[[env-vars]]
|
|
1739
1966
|
=== Environment Variables in ReleaseHx
|
|
@@ -1763,7 +1990,7 @@ If you add a non-standard API, please consider <<contributing,contributing it>>
|
|
|
1763
1990
|
|
|
1764
1991
|
ReleaseHx connects to all upstream REST APIs via YAML-based client configurations.
|
|
1765
1992
|
|
|
1766
|
-
For reference, the official configs for the three supported REST APIs are at link:{
|
|
1993
|
+
For reference, the official configs for the three supported REST APIs are at link:{this_proj_src_www_url}/blob/lib/releasehx/rest/clients/jira.yml[jira.yml], link:{this_proj_src_www_url}/blob/lib/releasehx/rest/clients/github.yml[github.yml], and link:{this_proj_src_www_url}/blob/lib/releasehx/rest/clients/gitlab.yml[gitlab.yml].
|
|
1767
1994
|
|
|
1768
1995
|
To override any of these or to add your own, place a file at `.releasehx/rest/clients/<hostslug>.yml`.
|
|
1769
1996
|
Make sure it conforms to the schema defined in `specs/data/api-client-schema.yaml`.
|
|
@@ -1852,9 +2079,9 @@ Most configuration of output (for drafting or enriching), is handled in the main
|
|
|
1852
2079
|
|
|
1853
2080
|
For reference, the official mapping configs for the three supported REST APIs are at:
|
|
1854
2081
|
|
|
1855
|
-
* link:{
|
|
1856
|
-
* link:{
|
|
1857
|
-
* link:{
|
|
2082
|
+
* link:{this_proj_src_www_url_files_path}/lib/releasehx/rest/mappings/jira.yaml[jira.yaml]
|
|
2083
|
+
* link:{this_proj_src_www_url_files_path}/lib/releasehx/rest/mappings/github.yaml[github.yaml]
|
|
2084
|
+
* link:{this_proj_src_www_url_files_path}/lib/releasehx/rest/mappings/gitlab.yaml[gitlab.yaml]
|
|
1858
2085
|
|
|
1859
2086
|
To override any of these or to add your own, place a file at `.releasehx/rest/mappings/<hostslug>.yml`.
|
|
1860
2087
|
|
|
@@ -1880,7 +2107,7 @@ The extracted value is available in the `path` local variable.
|
|
|
1880
2107
|
==== Sandboxed Ruby Transformations
|
|
1881
2108
|
|
|
1882
2109
|
The `ruby` key provides a powerful way to perform complex data transformations using a secure, sandboxed Ruby environment.
|
|
1883
|
-
This sandbox is powered by the `SchemaGraphy::SafeTransform` class, which ensures that only an explicit allowlist of safe methods and language features can be used.
|
|
2110
|
+
This sandbox is powered by the `SchemaGraphy::SafeTransform` class (from link:{schemagraphy_www_url}[SchemaGraphy gem]), which ensures that only an explicit allowlist of safe methods and language features can be used.
|
|
1884
2111
|
|
|
1885
2112
|
[[sandboxed-ruby-context]]
|
|
1886
2113
|
===== Execution Context
|
|
@@ -1967,8 +2194,7 @@ For example, if your GitHub issues use labels like:
|
|
|
1967
2194
|
Your ReleaseHx application will need an alternate mapping because the default GitHub mapping expects native `issue_type.name` fields.
|
|
1968
2195
|
|
|
1969
2196
|
An example alternate mapping for label-based GitHub type extraction can be found at:
|
|
1970
|
-
|
|
1971
|
-
`link:{releasehx_demo_repo}/blob/main/_mappings_/legacy-labels/github.yaml[releasehx-demo/_mappings_/legacy-labels/github.yaml]`
|
|
2197
|
+
link:{releasehx-demo_repo_www_url}/blob/main/_mappings_/legacy-labels/github.yaml[`releasehx-demo/_mappings_/legacy-labels/github.yaml`]
|
|
1972
2198
|
|
|
1973
2199
|
This mapping includes Ruby logic to:
|
|
1974
2200
|
|
|
@@ -2020,7 +2246,7 @@ To use an alternate mapping:
|
|
|
2020
2246
|
|
|
2021
2247
|
. Test with representative payload data to ensure proper extraction
|
|
2022
2248
|
|
|
2023
|
-
The link:{
|
|
2249
|
+
The link:{releasehx-demo_repo_www_url}[demo repository] contains working examples of these alternate mappings alongside their corresponding configurations and test payloads.
|
|
2024
2250
|
|
|
2025
2251
|
[NOTE]
|
|
2026
2252
|
ReleaseHx by default looks for a mapping file that matches the name of the API you are using.
|
|
@@ -2034,9 +2260,8 @@ The custom mappings path can be set using <<conf_ppty_paths_mappings_dir>> setti
|
|
|
2034
2260
|
|
|
2035
2261
|
ReleaseHx generally uses enhanced *Liquid 4 templates* to generate new files and content from RHYML and configuration data.
|
|
2036
2262
|
|
|
2037
|
-
Notably, it employs *link:https://jekyllrb.com/docs/liquid/[Jekyll's extended tags and filters]*, as well as some additional tag and several filters provided by
|
|
2038
|
-
|
|
2039
|
-
Here we document the custom filters added by the Sourcerer module and ReleaseHx itself.
|
|
2263
|
+
Notably, it employs *link:https://jekyllrb.com/docs/liquid/[Jekyll's extended tags and filters]*, as well as some additional tag and several filters provided by AsciiSourcerer.
|
|
2264
|
+
Here we document the custom filters added by the link:{asciisourcerer_www_url}[AsciiSourcerer gem] and ReleaseHx itself.
|
|
2040
2265
|
|
|
2041
2266
|
[[advanced-template-configuration]]
|
|
2042
2267
|
==== Advanced Template Configuration
|
|
@@ -2057,11 +2282,34 @@ Using the ReleaseHx config file, you can manipulate:
|
|
|
2057
2282
|
|
|
2058
2283
|
Most of this can be manipulated using the following sections: <<conf_ppty_history>>, <<conf_ppty_changelog>>, <<conf_ppty_notes>>, <<conf_ppty_links>>, as well as within change-metadata config blocks, where you can alter labels, icons, and such: <<conf_ppty_types>>, <<conf_ppty_parts>>, <<conf_ppty_tags>>.
|
|
2059
2284
|
|
|
2060
|
-
The various sample configurations found in the link:{
|
|
2285
|
+
The various sample configurations found in the link:{releasehx-demo_repo_www_url}/blob/main/configs/[demo repository] illustrate many of these options.
|
|
2061
2286
|
|
|
2062
2287
|
A complete link:{default-config_www}[sample config] displays default values and commented descriptions of all available properties.
|
|
2063
2288
|
|
|
2064
|
-
[[
|
|
2289
|
+
[[template-support]]
|
|
2290
|
+
==== Template and Theme Support Policy
|
|
2291
|
+
|
|
2292
|
+
The RHYML templates in link:{this_proj_src_www_url_files_path}/lib/releasehx/rhyml/templates/[`lib/releasehx/rhyml/templates/`] are the default templates used for drafting and enriching content.
|
|
2293
|
+
|
|
2294
|
+
Templates filenames formatted like `*.{html,yaml,md,adoc}.liquid` all contain expressive markup intended for output.
|
|
2295
|
+
We will call these files, such as `changelog.adoc.liquid` and `changelog.html.liquid` _expressive templates_.
|
|
2296
|
+
|
|
2297
|
+
All files that are just `<string>.liquid`, such as `changes-sorter.liquid` and `parts-listing.liquid` merely generate data objects and produce express no output to the rendered output.
|
|
2298
|
+
We'll call these _parsing templates_.
|
|
2299
|
+
|
|
2300
|
+
During pre-1.0 releases, changes made to _parsing templates_ will maintain backward compatibility.
|
|
2301
|
+
Deprecations will be announced as early as possible, but we will not change the output of these files except by addition or in the case of a bug, in which case we will change the output to match the documented/expected processing.
|
|
2302
|
+
|
|
2303
|
+
When it comes to _expressive templates_, DocOps Lab intends to make incremental improvements and fine tuning.
|
|
2304
|
+
|
|
2305
|
+
You will always be able to use the templates from a prior version by dropping them into your local custom-templates directory (`_templates/`) by default, but set using {ppty_conf_paths_templates_dir}.
|
|
2306
|
+
|
|
2307
|
+
_After the 1.0 release_, all templates will be kept backward compatible between major releases; so no breaking changes until 2.0, 3.0, etc.
|
|
2308
|
+
|
|
2309
|
+
[NOTE]
|
|
2310
|
+
This is true of the RHYML domain-specific language, as well.
|
|
2311
|
+
We may modify it during pre-1.0 development, but it will be kept backward compatible thereafter.
|
|
2312
|
+
|
|
2065
2313
|
[[custom-liquid-tags]]
|
|
2066
2314
|
==== Custom Liquid Tags
|
|
2067
2315
|
|
|
@@ -2161,6 +2409,20 @@ Returns a YAML representation of the input for debugging purposes.
|
|
|
2161
2409
|
example:::
|
|
2162
2410
|
`{{ changes | inspect_yaml }}`
|
|
2163
2411
|
|
|
2412
|
+
[[jekyll-asciidoc-liquid-filters]]
|
|
2413
|
+
==== Jekyll/AsciiDoc Liquid Filters
|
|
2414
|
+
|
|
2415
|
+
ReleaseHx supports all link:https://jekyllrb.com/docs/liquid/filters/[filters provided by Jekyll 4.4].
|
|
2416
|
+
|
|
2417
|
+
It also includes all filters provided by the jekyll-asciidoc plugin.
|
|
2418
|
+
|
|
2419
|
+
asciidocify::
|
|
2420
|
+
Uses Asciidoctor API to convert a string of AsciiDoc content to HTML.
|
|
2421
|
+
|
|
2422
|
+
tocify_asciidoc::
|
|
2423
|
+
Generates a table of contents in HTML from the parsed AsciiDoc document of the current page.
|
|
2424
|
+
For use outside the context of a full AsciiDoc document, such as in a sidebar or drop-down ToC.
|
|
2425
|
+
|
|
2164
2426
|
|
|
2165
2427
|
[[troubleshooting]]
|
|
2166
2428
|
== Troubleshooting
|
|
@@ -2232,18 +2494,6 @@ Solution::
|
|
|
2232
2494
|
. Review Jekyll's Liquid documentation for supported tags and filters
|
|
2233
2495
|
|
|
2234
2496
|
|
|
2235
|
-
ifdef::site-gen-jekyll[]
|
|
2236
|
-
[[apis]]
|
|
2237
|
-
== APIs
|
|
2238
|
-
|
|
2239
|
-
Documntation for th ReleaseHx, SchemaGraphy, and Sourcerer APIs is available at:
|
|
2240
|
-
|
|
2241
|
-
* link:/api/releasehx[ReleaseHx API]
|
|
2242
|
-
* link:/api/schemagraphy[SchemaGraphy API]
|
|
2243
|
-
* link:/api/sourcerer[Sourcerer API]
|
|
2244
|
-
|
|
2245
|
-
endif::[]
|
|
2246
|
-
|
|
2247
2497
|
|
|
2248
2498
|
ifndef::site-gen-jekyll[]
|
|
2249
2499
|
// tag::releasehx-api[]
|
|
@@ -2305,8 +2555,8 @@ To work with ReleaseHx source, clone both repositories side by side for the most
|
|
|
2305
2555
|
. Clone both repositories.
|
|
2306
2556
|
+
|
|
2307
2557
|
[.prompt]
|
|
2308
|
-
git clone {
|
|
2309
|
-
git clone {
|
|
2558
|
+
git clone {this_proj_src_www_url}
|
|
2559
|
+
git clone {releasehx-demo_repo_www_url}
|
|
2310
2560
|
+
|
|
2311
2561
|
This will give you `<source_dir>/releasehx` and `<source_dir>/releasehx-demo`, side by side.
|
|
2312
2562
|
|
|
@@ -2320,9 +2570,9 @@ From the `releasehx` repository:
|
|
|
2320
2570
|
[.prompt]
|
|
2321
2571
|
cd releasehx
|
|
2322
2572
|
bundle install
|
|
2323
|
-
bundle exec rake build
|
|
2573
|
+
bundle exec rake build:gem
|
|
2324
2574
|
+
|
|
2325
|
-
This
|
|
2575
|
+
This operation generates untracked dependencies during a _pre-build_ stage and compiles the gem file in the `pkg/` directory.
|
|
2326
2576
|
|
|
2327
2577
|
. Install the locally built gem for testing.
|
|
2328
2578
|
+
|
|
@@ -2337,7 +2587,7 @@ Alternatively, for development testing without installing:
|
|
|
2337
2587
|
. Run the test suite to verify functionality.
|
|
2338
2588
|
+
|
|
2339
2589
|
[.prompt]
|
|
2340
|
-
bundle exec rake
|
|
2590
|
+
bundle exec rake rspec
|
|
2341
2591
|
|
|
2342
2592
|
[[working-with-the-demo-repository]]
|
|
2343
2593
|
==== Working with the Demo Repository
|
|
@@ -2426,7 +2676,7 @@ Additionally, the help screen itself is sourced here in this README and included
|
|
|
2426
2676
|
The application help and manpage documentation is also sourced in this way.
|
|
2427
2677
|
(Use `rhx --help` or `rhx --man` to reveal.)
|
|
2428
2678
|
|
|
2429
|
-
This capability is provided by the
|
|
2679
|
+
This capability is provided by the link:{asciisourcerer_www_url}[AsciiSourcerer gem].
|
|
2430
2680
|
|
|
2431
2681
|
[[common-dev-tasks]]
|
|
2432
2682
|
=== Common Dev Tasks
|
|
@@ -2457,7 +2707,7 @@ To maintain DRY sourcing, make your changes in the following files:
|
|
|
2457
2707
|
To build the documentation locally, run the following command from the project root:
|
|
2458
2708
|
|
|
2459
2709
|
[.prompt]
|
|
2460
|
-
bundle exec rake docs
|
|
2710
|
+
bundle exec rake build:docs
|
|
2461
2711
|
|
|
2462
2712
|
This will generate the documentation in the `build/docs` directory.
|
|
2463
2713
|
|
|
@@ -2476,6 +2726,7 @@ Use `PORT=NNNN` environment argument to specify a different port.
|
|
|
2476
2726
|
[.prompt]
|
|
2477
2727
|
PORT=4000 bundle exec rake serve
|
|
2478
2728
|
|
|
2729
|
+
[[docopslab-devtool]]
|
|
2479
2730
|
==== DocOps Lab Devtool (`docopslab-dev`)
|
|
2480
2731
|
|
|
2481
2732
|
Special dev Rake tasks and libraries are available via the `docopslab-dev` gem.
|
|
@@ -2484,7 +2735,7 @@ Special dev Rake tasks and libraries are available via the `docopslab-dev` gem.
|
|
|
2484
2735
|
[.prompt]
|
|
2485
2736
|
bundle exec rake --tasks | grep labdev:
|
|
2486
2737
|
|
|
2487
|
-
The link:{
|
|
2738
|
+
The link:{docopslab_src_www_url}/lab/tree/main/gems/docopslab-dev/README.adoc[DocOps Lab Devtool] or see `.agent/docs/topics/docpslab-devtool`.
|
|
2488
2739
|
|
|
2489
2740
|
// tag::releasehx-api[]
|
|
2490
2741
|
[[issue-data-mapping]]
|
|
@@ -2623,71 +2874,54 @@ Dockerfile # Docker image definition
|
|
|
2623
2874
|
build/ # Untracked, ephemeral path for generated assets
|
|
2624
2875
|
docs/ # Documentation build source (Jekyll, YARD)
|
|
2625
2876
|
.config/ # Config files for various tools
|
|
2626
|
-
├── sourcerer.yml
|
|
2627
|
-
└── docopslab-dev.yml
|
|
2877
|
+
├── sourcerer.yml # Sourcerer prebuild manifest
|
|
2878
|
+
└── docopslab-dev.yml # DocOpsLab Devtool config
|
|
2628
2879
|
specs/
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2880
|
+
├── data/ # Schema/definition files
|
|
2881
|
+
│ ├── config-def.yml # Configuration definition
|
|
2882
|
+
│ ├── rhyml-schema.yaml # RHYML schema definition
|
|
2883
|
+
│ ├── api-client-schema.yaml # API client schema definition
|
|
2884
|
+
│ ├── rhyml-mapping-schema.yaml # API -> RHYML schema definition
|
|
2885
|
+
│ └── mcp-manifest.yml # Asset registry for MCP server
|
|
2886
|
+
└── tests/
|
|
2887
|
+
├── README.adoc
|
|
2888
|
+
├── rspec/ # RSpec tests
|
|
2889
|
+
└── configs/ # Test configs
|
|
2639
2890
|
lib/
|
|
2640
|
-
├── releasehx.rb # Application core
|
|
2641
|
-
├── schemagraphy.rb # Special YAML handling
|
|
2642
|
-
├── sourcerer.rb # Single-sourcing tool
|
|
2643
2891
|
├── docopslab/
|
|
2644
2892
|
│ ├── mcp/ # MCP assets and packaging
|
|
2645
2893
|
│ └── mcp.rb # DocOpsLab MCP entrypoint
|
|
2646
|
-
├── releasehx
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
│
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
│
|
|
2662
|
-
│
|
|
2663
|
-
|
|
2664
|
-
│
|
|
2665
|
-
│
|
|
2666
|
-
│
|
|
2667
|
-
│
|
|
2668
|
-
│
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
│ ├── cfgyml/ # CFGYML (OpenCFGY) parsing
|
|
2678
|
-
│ ├── attribute_resolver.rb # Resolves {attribute_name} placeholders
|
|
2679
|
-
│ ├── loader.rb # `SchemaGraphy::Loader`
|
|
2680
|
-
│ ├── regexp_utils.rb # Regular expression utilities
|
|
2681
|
-
│ ├── schema_utils.rb # `get_schema_defaults`, etc
|
|
2682
|
-
│ ├── tag_utils.rb # `detag`, `tag_of`, etc
|
|
2683
|
-
│ ├── templates/ # CFGYML documentation templates
|
|
2684
|
-
│ │ └── cfgyml/ # Config reference templates (+ sample gen)
|
|
2685
|
-
│ └── templating.rb # Defines handling of parsable YAML nodes
|
|
2686
|
-
└── sourcerer/
|
|
2687
|
-
├── builder.rb # Writes snippets to files at build time
|
|
2688
|
-
├── jekyll.rb # Jekyll and Liquid handling for Sourcerer
|
|
2689
|
-
├── plaintext_converter.rb # Pre-processes AsciiDoc source files
|
|
2690
|
-
└── templating.rb # Liquid/ERB template handling
|
|
2894
|
+
├── releasehx.rb # Application core
|
|
2895
|
+
└── releasehx/
|
|
2896
|
+
├── cli.rb # Thor CLI definition
|
|
2897
|
+
├── configuration.rb # CFGYML parsing
|
|
2898
|
+
├── generated.rb # Generated by prebuild (packaged)
|
|
2899
|
+
├── helpers.rb # Utility helpers
|
|
2900
|
+
├── mcp/ # MCP server assets
|
|
2901
|
+
├── mcp.rb # MCP server entrypoint
|
|
2902
|
+
├── README.adoc # Internal developer notes
|
|
2903
|
+
├── rhyml.rb # RHYML entrypoint
|
|
2904
|
+
├── sgyml/ # SGYML helpers
|
|
2905
|
+
│ └── helpers.rb # module SgymlHelpers
|
|
2906
|
+
├── transforms/ # Input transformations (ADF, etc)
|
|
2907
|
+
├── version.rb # Version constant
|
|
2908
|
+
├── rest/ # module REST
|
|
2909
|
+
│ ├── yaml_client.rb # ReleaseHx::REST::YamlClient class
|
|
2910
|
+
│ └── clients/ # YAML files for API clients (jira.yaml, etc)
|
|
2911
|
+
├── ops/ # Main ReleaseHx methods
|
|
2912
|
+
│ ├── check_ops.rb # ReleaseHx::CheckOps module
|
|
2913
|
+
│ ├── draft_ops.rb # ReleaseHx::DraftOps module
|
|
2914
|
+
│ ├── enrich_ops.rb # ReleaseHx::EnrichOps module
|
|
2915
|
+
│ ├── template_ops.rb # ReleaseHx::TemplateOps module
|
|
2916
|
+
│ └── write_ops.rb # ReleaseHx::WriteOps module
|
|
2917
|
+
└── rhyml/ # module RHYML
|
|
2918
|
+
├── adapter.rb # maps from JSON using a mapping file
|
|
2919
|
+
├── change.rb # Change class
|
|
2920
|
+
├── liquid.rb # Liquid filters for RHYML
|
|
2921
|
+
├── release.rb # Release class
|
|
2922
|
+
├── loaders.rb # loads RHYML YAML or JSON from disk
|
|
2923
|
+
├── mappings/ # API -> RHYML mappings
|
|
2924
|
+
└── templates/ # RHYML output templates
|
|
2691
2925
|
----
|
|
2692
2926
|
// end::ai-prompt[]
|
|
2693
2927
|
|
|
@@ -2701,200 +2935,6 @@ For now it's easier to test inside the one gem that is making immediate use of t
|
|
|
2701
2935
|
|
|
2702
2936
|
If the MVP pans out (which is uncertain given how weak MCP tech is and how frustrating it was to get it working with various clients), I will upstream it for use in any Ruby projects.
|
|
2703
2937
|
|
|
2704
|
-
[[sourcerer]]
|
|
2705
|
-
=== Sourcerer
|
|
2706
|
-
// tag::sourcerer[]
|
|
2707
|
-
This gem introduces a module called Sourcerer, by which AsciiDoc files can be parsed and their contents harvested for use in the application build.
|
|
2708
|
-
The module also handles Liquid template processing with enhanced attribute resolution capabilities.
|
|
2709
|
-
|
|
2710
|
-
[NOTE]
|
|
2711
|
-
Sourcerer is intended to be spun off as its own gem once it successfully proves the concept in this gem.
|
|
2712
|
-
It will probably be called _AsciiSourcerer_ and may replace an older and unmaintained utility of mine called LiquiDoc.
|
|
2713
|
-
|
|
2714
|
-
It is invoked in the Rakefile, establishing global namespaces:
|
|
2715
|
-
|
|
2716
|
-
* `ReleaseHx::ATTRIBUTES[:globals]` (derived from this `README.adoc` file)
|
|
2717
|
-
* `ReleaseHx.read_built_snippet(:<name>)` (such as `:helpscreen`)
|
|
2718
|
-
|
|
2719
|
-
The Sourcerer module also generates files like `build/docs/manpage.adoc`, which generates the formatted terminal manual, using content from `build/docs/config-reference.adoc` and this README (`tags="cli_options"`, for instance).
|
|
2720
|
-
|
|
2721
|
-
It also generates an AsciiDoc-formatted configuration reference, a machine-readable JSON reference, and a sample config using the `specs/data/config-def.yml` file.
|
|
2722
|
-
The Sourcerer system now supports *attribute resolution* from AsciiDoc source files, enabling templates to access README attributes during rendering, ensuring configuration documentation reflects actual default values.
|
|
2723
|
-
|
|
2724
|
-
Sourcerer also performs basic testing of select commands in the ASciiDoc file that have been assigned a `testable` role.
|
|
2725
|
-
|
|
2726
|
-
This is mostly just showing off what Sourcerer can do, and hopefully setting into habit some best practices for my more complicated apps.
|
|
2727
|
-
|
|
2728
|
-
Sourcerer is also where integration with Jekyll's extensions of Liquid occurs, bringing ReleaseHx's templating powers closely in line with how Jekyll's work, as described in <<custom-liquid>>.
|
|
2729
|
-
// end::sourcerer[]
|
|
2730
|
-
|
|
2731
|
-
[[schemagraphy]]
|
|
2732
|
-
=== SchemaGraphy
|
|
2733
|
-
|
|
2734
|
-
This gem also introduces a module that derives from an unreleased gem I have been working on for some years: SchemaGraphy.
|
|
2735
|
-
|
|
2736
|
-
SchemaGraphy is basically an extension of YAML, enabling Ruby developers and end users more broadly to powerfully interpret and schematize YAML-based data.
|
|
2737
|
-
Most relevant to our case, as enabled by the `SchemaGraphy` module in this gem, is its handling of *YAML custom tags*, *attribute resolution*, and what I am calling *"`templated fields`"*, where the value of a YAML node is a String that is intended to be further processed by a templating engine like Liquid or ERB, either immediately upon ingest or later in the runtime stack, when it can be mixed with additional data.
|
|
2738
|
-
|
|
2739
|
-
SchemaGraphy facilitates handling these and other quirky power-ups we use with our fully valid YAML files, so low-code users can pass some dynamism along in their YAML configs and so forth.
|
|
2740
|
-
|
|
2741
|
-
[[attribute-resolution]]
|
|
2742
|
-
==== Attribute Resolution
|
|
2743
|
-
|
|
2744
|
-
SchemaGraphy provides *attribute resolution* capabilities through the `AttributeResolver` component.
|
|
2745
|
-
This enables YAML files to reference external attributes using placeholder syntax like `{attribute_name}`.
|
|
2746
|
-
|
|
2747
|
-
When loading YAML with `.load_yaml_with_attributes(file_path, attributes)`, SchemaGraphy:
|
|
2748
|
-
|
|
2749
|
-
. Loads the YAML file normally
|
|
2750
|
-
. Searches for `{attribute_name}` patterns in String values
|
|
2751
|
-
. Replaces them with corresponding values from the provided attributes Hash
|
|
2752
|
-
. Returns the resolved YAML data structure
|
|
2753
|
-
|
|
2754
|
-
This is used extensively in ReleaseHx's configuration system to enable single-sourcing of defaults from README attributes.
|
|
2755
|
-
|
|
2756
|
-
[[custom-yaml-tag-handling]]
|
|
2757
|
-
==== Custom YAML Tag Handling
|
|
2758
|
-
|
|
2759
|
-
To enable end users to pass meta-instructions along with their data, wherever it will make sense to do so, SchemaGraphy offers a straightforward handling system.
|
|
2760
|
-
|
|
2761
|
-
Wherever you parse YAML-formatted data using `.load_yaml_with_tags`, custom-tagged Scalar nodes are converted into Maps like so:
|
|
2762
|
-
|
|
2763
|
-
.User's YAML
|
|
2764
|
-
[source,yaml]
|
|
2765
|
-
----
|
|
2766
|
-
some_property: !liquid "{{ some_value }}"
|
|
2767
|
-
----
|
|
2768
|
-
|
|
2769
|
-
.Converted data TagMap
|
|
2770
|
-
[source,yaml]
|
|
2771
|
-
----
|
|
2772
|
-
some_property:
|
|
2773
|
-
__tag__: liquid
|
|
2774
|
-
value: "{{ some_value }}"
|
|
2775
|
-
----
|
|
2776
|
-
|
|
2777
|
-
Developers may therefore conditionally interpret ingested data based on user-defined classifications, wherever the developer supports such things.
|
|
2778
|
-
|
|
2779
|
-
Whether a Scalar has been transformed into a TagMap, you can resolve it using:
|
|
2780
|
-
|
|
2781
|
-
[source,ruby]
|
|
2782
|
-
----
|
|
2783
|
-
SchemaGraphy::TagUtils.detag(some_property)
|
|
2784
|
-
# Or, with a local alias
|
|
2785
|
-
detag = ->(val) { SchemaGraphy::TagUtils.detag(val) }
|
|
2786
|
-
detag(some_property)
|
|
2787
|
-
----
|
|
2788
|
-
|
|
2789
|
-
When tags are used this way, to convey a syntax/engine for processing a template or other dynamic content, SchemaGraphy can even help us handle the content in the manner designated by the tag.
|
|
2790
|
-
This will come up again in <<templated-fields,the next section>>.
|
|
2791
|
-
|
|
2792
|
-
[NOTE]
|
|
2793
|
-
This capability is only available on Scalar node values.
|
|
2794
|
-
For now, tags applied to other compound node types (Arrays/sequences, Maps/mappings) will be ignored by SchemaGraphy interpreters.
|
|
2795
|
-
|
|
2796
|
-
[WARNING]
|
|
2797
|
-
When you use `load_yaml_with_tags`, you will encounter errors downstream if a user places a tag on a node where you do not expect it.
|
|
2798
|
-
|
|
2799
|
-
[[templated-fields]]
|
|
2800
|
-
==== Templated Property Values in YAML
|
|
2801
|
-
|
|
2802
|
-
We are calling these "`templated fields`" to specify that we are talking about enabling end users to use Liquid, ERB, or eventually other templating syntaxes in YAML node values.
|
|
2803
|
-
|
|
2804
|
-
In so doing, developer are able to designate that the value of certain YAML nodes should be handled by a templating engine, as well as when and how.
|
|
2805
|
-
|
|
2806
|
-
We'll look at how this is done in <<templated-fields-handling>>.
|
|
2807
|
-
For now, the point is that sometimes files like `specs/data/config-def.yml` or an API-mapping file call for a little more runtime dynamism than a low-code solution like pure YAML can support.
|
|
2808
|
-
|
|
2809
|
-
Therefore, when the value of a user-configurable or environment-deterimined "`setting`" is a string that must be generated from data defined outside that field, we parse and render the template at runtime, using data from the environment or elsewhere.
|
|
2810
|
-
For now, it is up to our calling code to provide the appropriate variables to the template depending on the context.
|
|
2811
|
-
|
|
2812
|
-
[[config-def]]
|
|
2813
|
-
==== Configuration Definition (CFGYML)
|
|
2814
|
-
|
|
2815
|
-
All user-configurable settings have a definition, if not also a default value.
|
|
2816
|
-
For single-sourcing purposes, these are defined in a YAML format called CFGYML -- a configuration-file modeling language.
|
|
2817
|
-
|
|
2818
|
-
The file is at `{gem_config_definition_path}`.
|
|
2819
|
-
It is used to establish the literal default settings carried by the application, and also to document those settings for the user.
|
|
2820
|
-
|
|
2821
|
-
This practice lets developers give end users extremely detailed configurations, always well documented.
|
|
2822
|
-
|
|
2823
|
-
[[attribute-resolution-in-cfgyml]]
|
|
2824
|
-
===== Attribute Resolution in CFGYML
|
|
2825
|
-
|
|
2826
|
-
CFGYML supports *attribute resolution* from AsciiDoc files (like this README) using placeholder syntax.
|
|
2827
|
-
Default values can reference README attributes using `{attribute_name}` syntax:
|
|
2828
|
-
|
|
2829
|
-
[source,yaml]
|
|
2830
|
-
----
|
|
2831
|
-
properties:
|
|
2832
|
-
$meta:
|
|
2833
|
-
properties:
|
|
2834
|
-
markup:
|
|
2835
|
-
dflt: "{default_markup}" # Resolved from README.adoc :default_markup: attribute
|
|
2836
|
-
----
|
|
2837
|
-
|
|
2838
|
-
This enables single-sourcing of configuration defaults from README attributes, ensuring that documentation and defaults stay synchronized.
|
|
2839
|
-
|
|
2840
|
-
[[cfgyml-schema-structure]]
|
|
2841
|
-
===== CFGYML Schema Structure
|
|
2842
|
-
|
|
2843
|
-
The basic schema is somewhat straightforward.
|
|
2844
|
-
Essentially, you're nesting Map objects within a YAML key `properties`, and each property (setting) of the defined config file can be described and constrained.
|
|
2845
|
-
|
|
2846
|
-
Each setting can have a type, description (`desc`), default (`dflt`), and templated-field instructions (`templating`).
|
|
2847
|
-
If the setting is itself a of type `Map` (YAML "`mapping`", JSON "`object`"), its own nested parameters can be established with a `properties:` block.
|
|
2848
|
-
|
|
2849
|
-
For now, you can designate the type, which you will have to enforce in your code, as well as a default value.
|
|
2850
|
-
|
|
2851
|
-
[[sgyml-schemas]]
|
|
2852
|
-
==== SGYML Schemas
|
|
2853
|
-
|
|
2854
|
-
Similar to but more complicated than CFGYML definition files are SchemaGraphy schema files.
|
|
2855
|
-
This is a partially specified, partially developed, and as-yet-incomplete syntax for designating and constraining YAML documents.
|
|
2856
|
-
|
|
2857
|
-
ReleaseHx at this time makes active use of only minimal aspects of these schemas, all of which are contained in the `specs/` directory at the root of the gem source.
|
|
2858
|
-
|
|
2859
|
-
Each of the YAML formats used by ReleaseHx has its own schema in the repo.
|
|
2860
|
-
The cfgyml-schema.yaml file will eventually be spun off, but the `specs/data/rhyml-schema.yaml` and `specs/data/rhyml-mapping-schema.yaml` files will stay here, defining valid formats for the types of files they apply to.
|
|
2861
|
-
|
|
2862
|
-
Since SchemaGraphy itself is still unreleased, CFGYML as introduced in this gem offers only a subset of what it will enable down the road.
|
|
2863
|
-
|
|
2864
|
-
Once SchemaGraphy is generally available, this gem will call it as a dependency.
|
|
2865
|
-
At that point, a file like `specs/data/config-def.yml` (CFGYML) will be able to impose a more detailed `$schema` for any property.
|
|
2866
|
-
|
|
2867
|
-
[[templated-fields-handling]]
|
|
2868
|
-
==== Dynamic Templated-field Handling
|
|
2869
|
-
|
|
2870
|
-
The most powerful function of SchemaGraphy schemas that is now available in ReleaseHx is the ability to instruct how templated fields should be processed at different stages, and also to parse and render them as needed.
|
|
2871
|
-
|
|
2872
|
-
Templated-field handling can be established between a combination of (1) CFGYML definition files or SGYML schema files and (2) configuration files to be applied at runtime.
|
|
2873
|
-
|
|
2874
|
-
Developers can designate a given property to be `type: Template` in a schema or definition.
|
|
2875
|
-
This "`typing`" can be a trigger for downstream parsing/rendering of the template.
|
|
2876
|
-
|
|
2877
|
-
[NOTE]
|
|
2878
|
-
Liquid uses these two stages.
|
|
2879
|
-
The _parse_ operation compiles a template into a `Liquid::Template` object.
|
|
2880
|
-
The _render_ operation applies a dataset to the loaded template, generating a String with Liquid tags resolved.
|
|
2881
|
-
|
|
2882
|
-
[[nyi]]
|
|
2883
|
-
==== Not Yet Implemented
|
|
2884
|
-
|
|
2885
|
-
Most aspects of SchemaGraphy/SGYML are not yet available in ReleaseHx, but some are worth pointing out.
|
|
2886
|
-
|
|
2887
|
-
data types::
|
|
2888
|
-
As of now, the `type` node of any property in `specs/data/config-def.yml` is not particularly functional.
|
|
2889
|
-
I do have a whole table of "`data types`" in SGYML, most of which are extremely self-explanatory and drawn from fairly platonic, cross-language terms.
|
|
2890
|
-
+
|
|
2891
|
-
However, these are entirely unenforced in ReleaseHx -- for now, data still has to be type checked explicitly in the Ruby code, and user configs are not validated against any kind of typing system.
|
|
2892
|
-
|
|
2893
|
-
schema docs::
|
|
2894
|
-
The schema files do not yet generate complete reference docs for the subject files that they govern.
|
|
2895
|
-
So for instance, you'll have to read files like `specs/data/rhyml-schema.yaml` and `specs/data/rhyml-mapping-schema.yaml` directly to understand the format of RHYML files and how they are mapped to REST response payloads.
|
|
2896
|
-
// end::schemagraphy[]
|
|
2897
|
-
|
|
2898
2938
|
[[docs-deployment]]
|
|
2899
2939
|
=== Documentation Deployment
|
|
2900
2940
|
|