Repository navigation
fix: auto-detect .structkit.yaml for struct_file default - #4
Merged
Merged
Conversation
structkit 3.3.0 renamed the default project file. The action still defaulted struct_file to .struct.yaml and passed it to validate, so repos that only have .structkit.yaml failed. When struct_file is empty, prefer .structkit.yaml, then .struct.yaml, or fail with a clear error. Explicit paths are unchanged. Co-authored-by: Kenneth Belitzky <kenny@belitzky.com>
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.
Problem
structkit v3.3.0 renamed the default project file from
.struct.yamlto.structkit.yaml. The CLIgeneratecommand prefers.structkit.yamland falls back to.struct.yaml, butvalidate/vars/linttake an explicit path with no fallback.This action still defaulted
struct_fileto.struct.yamland runsvalidateby default, so repos that only have.structkit.yamlfailed.Solution
When
struct_fileis empty or unset, auto-detect the config file:.structkit.yamlif it exists.struct.yamlstruct_fileinputExplicit
struct_filevalues are passed through unchanged.Also in this PR
.struct.yamlfallback inaction.ymland the READMEno_hooksrequires structkit >= 3.3.0.structkit.yamlTesting
tests/resolve-struct-file.test.shstructkit validate(3.3.0) on both fixtures.github/workflows/test.ymljobs