Skip to content

Repository ruleset event doesn't match schema #3429

@stevehipwell

Description

@stevehipwell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions