Repository navigation
Conversation
Raw ruleset values reach the Rulesets API as strings, except true/false and the keys in _NUMERICAL_VALUE_KEYS. integration_id is not among them, so the example's "integration_id: -1" is sent as "-1" and GitHub rejects the whole ruleset with "Invalid property /rules/0: data matches no possible input". apache/infrastructure-actions copied the example and hit exactly that. Leaving integration_id out means "any source", which is what -1 was meant to say, so the example drops it and a note explains why. Generated-by: Claude Opus 5
This branch has not been deployed
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.
The raw-payload ruleset example sets
integration_id: -1on its required status check. Copied as is, it fails: raw values reach the Rulesets API as strings excepttrue/falseand the keys in_NUMERICAL_VALUE_KEYS, andintegration_idis not among them, so GitHub receives"-1"and rejects the ruleset withInvalid property /rules/0: data matches no possible input.apache/infrastructure-actions hit this when its
Required checksruleset (copied from the example) failed to apply; the fix there is apache/infrastructure-actions#1414.integration_idfrom the example: leaving it out means any source, which is what-1was meant to say.Tested: README only. I ran the failing and fixed
.asf.yamlthrough_convert_to_boolintswith every scalar loaded as a string: before,integration_idcame out as'-1'; after, every value has the type the Rulesets API expects. Not run against a sandbox.A parser-side alternative is to add
integration_idto_NUMERICAL_VALUE_KEYS, so-1converts likeactor_iddoes. I left that out to keep this a documentation fix; happy to send it separately.Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting