-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
I'm looking at the code for the Ruleset
& RepositoryRuleset
types and both of them seem to be representing the same GH resource with slightly different implementations (Conditions
& Rules
). I can see that the Ruleset
type use for the REST API is technically valid even though it represents the rules as an opaque json.RawMessage
(this is what I'm looking to fix). But the RepositoryRuleset
and specifically the RepositoryRulesetRule
type doesn't match the schema for the repository_ruleset event, which is based on the same schema as for the REST API.
@gmlewis do you have additional context that I don't have to explain why this actually works? If not I plan on refactoring all of this code back to a common pattern as it used elsewhere as well as removing the json.RawMessage
fields which cause issues in consumers such as the GH TF provider.