Skip to content

README: drop integration_id from the raw ruleset example - #140

Open
potiuk wants to merge 1 commit into
apache:mainfrom
potiuk:readme-raw-integration-id
Open

potiuk wants to merge 1 commit into
apache:mainfrom
potiuk:readme-raw-integration-id

Conversation

@potiuk

@potiuk potiuk commented Oct 19, 2026

Copy link
Copy Markdown
Member

The raw-payload ruleset example sets integration_id: -1 on its required status check. Copied as is, it fails: raw values reach the Rulesets API as strings except true/false and the keys in _NUMERICAL_VALUE_KEYS, and integration_id is not among them, so GitHub receives "-1" and rejects the ruleset with Invalid property /rules/0: data matches no possible input.

apache/infrastructure-actions hit this when its Required checks ruleset (copied from the example) failed to apply; the fix there is apache/infrastructure-actions#1414.

  • Drop integration_id from the example: leaving it out means any source, which is what -1 was meant to say.
  • Add a note after the rule summary explaining the string conversion, so nobody re-adds it.

Tested: README only. I ran the failing and fixed .asf.yaml through _convert_to_boolints with every scalar loaded as a string: before, integration_id came 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_id to _NUMERICAL_VALUE_KEYS, so -1 converts like actor_id does. 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

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant