fix: scaffold submodules input in consumer ci.yml (#39)#41
Merged
Conversation
init only emitted tag/from-head/bump into the generated ci.yml, so the submodules input added in #40 never reached consumers -- and a hand-added line was clobbered on the next init --force. - init reads a 'submodules:' field from .hyperi-ci.yaml and renders it as the submodules input in the consumer ci.yml with: block (mirrors the publish-target branch), round-tripping it into the regenerated .hyperi-ci.yaml so re-init preserves it. - Runtime-safe: CIConfig is .get()-based, so the field is ignored by the config loader -- init-only. - docs/LESSONS.md: point the public-submodule path at the .hyperi-ci.yaml field + init render. Refs #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #39. Scaffold half of the
submodulesstory (PR #40 added the workflow input).Problem
hyperi-ci init->_render_workflow()only emitstag/from-head/bump(plus optionalpublish-target) into the generated consumerci.yml. So thesubmodulesinput from #40 never reaches a consumer through the scaffold, and a hand-addedsubmodules:line is clobbered on the nextinit --force.Change
initreads asubmodules:field from.hyperi-ci.yaml(_detect_submodules, mirroringdetect_license)._render_workflowemitssubmodules: <value>into thewith:block when set (mirrors the existingpublish-targetconditional)._render_hyperi_ci_yamlround-trips the field, so re-init preserves it.CIConfigis.get()-based with no strict validation, so the new key is ignored by the config loader -- it's init-only.docs/LESSONS.md: the public-submodule path now points at the.hyperi-ci.yamlfield +initrender.Result
.hyperi-ci.yaml:hyperi-ci initrendersci.yml:Verification
tests/unit/test_init.py: 51 passed..hyperi-ci.yamlis ignored by the runtime config loader (confirmedCIConfigreads only known keys).Together with #40, a consumer with a public submodule sets one field in
.hyperi-ci.yamland re-runshyperi-ci init-- no manual workflow editing.