Ironing out the kinks - #89
Open
UnstoppableMango wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines the Renovate schema pipeline by regenerating the Go schema types with more specific (non-interface{}) structures and by shifting tooling assumptions toward the Nix flake development environment.
Changes:
- Regenerated
pkg/renovate/zz_generated.schema.goto use typed element structs/enums (e.g.,ConfigCustomManagersElem) instead ofinterface{}/raw pointers in multiple places. - Updated schema tests to use the new generated types for
customManagersmarshalling. - Adjusted schema-generation tooling: Makefile now expects
go-jsonschemaandjqto be available externally (and adds them toflake.nixdevShell), plus a more robust jq filter script.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/renovate/zz_generated.schema.go | Regenerated schema models with more specific Go types and new helper type definitions. |
| pkg/renovate/schema_test.go | Updated test to construct CustomManagers using new generated element types/enums. |
| Makefile | Stops auto-building/downloading jq/go-jsonschema binaries; uses PATH tools instead for schema generation. |
| hack/renovate/delete-refs.jq | Replaces direct del expression with a walk-based filter to remove $ref == "#" under any properties. |
| flake.nix | Adds go-jsonschema and jq to the devShell inputs to support Makefile targets. |
| .versions/jq | Removes pinned jq version file. |
| .versions/go-jsonschema | Removes pinned go-jsonschema version file. |
| .gitignore | Ignores .claude/*. |
Files not reviewed (1)
- pkg/renovate/zz_generated.schema.go: Generated file
Comments suppressed due to low confidence (1)
Makefile:68
- This jq-based schema rewrite rule no longer pulls/builds
jqas a Makefile prerequisite, so it will fail on environments wherejqisn't installed. Consider adding a preflight check so users get a clear error message (and an obvious remediation) instead of a generic "command not found".
.make/renovate-schema.json: .make/renovate-schema.orig.json hack/renovate/*.jq
cat $< | $(JQ) -f hack/renovate/delete-refs.jq > $@
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+47
to
49
| pkg/renovate/zz_generated.schema.go: .make/renovate-schema.json | ||
| mkdir -p $(dir $@) | ||
| $(JSON2GO) --package renovate $< --only-models | sed s/RenovateSchemaJson/Config/g > $@ |
Comment on lines
+1
to
+7
| walk( | ||
| if type == "object" and has("properties") then | ||
| .properties |= with_entries(select(.value["$ref"] != "#")) | ||
| else | ||
| . | ||
| end | ||
| ) |
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.
No description provided.