Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Schema Inaccuracy] Recently added webhook event names branch_protection_configuration, repository_ruleset not consistently reflected in schema #3775

Open
jmehnle opened this issue Jul 20, 2024 · 1 comment

Comments

@jmehnle
Copy link

jmehnle commented Jul 20, 2024

Schema Inaccuracy

The recently-added webhook event names branch_protection_configuration, repository_ruleset not consistently reflected in schema. For example, components.schemas.webhook-check-suite-completed.properties.check_suite.properties.app.properties.events.items.enum doesn't list these. However, I'm receiving webhook events from GitHub that contain the following:

{
  "check_suite": {
    ...
    "app": {
      ...
      "events": [
        "branch_protection_configuration",  // <-- Oops!
        "branch_protection_rule",
        "check_run",
        "check_suite",
        "issue_comment",
        "member",
        "membership",
        "merge_group",
        "organization",
        "pull_request",
        "pull_request_review",
        "pull_request_review_comment",
        "pull_request_review_thread",
        "push",
        "repository",
        "repository_ruleset",  // <-- Oops!
        "status",
        "team",
        "team_add",
        "workflow_job",
        "workflow_run"
      ]
    },
    ...

Expected

components.schemas.webhook-check-suite-completed.properties.check_suite.properties.app.properties.events.items.enum and other enums of webhook event names should include branch_protection_configuration, repository_ruleset as generated in GitHub's webhook events.

Reproduction Steps

Just receive GitHub webhook events for check_suite events, and this will happen.

jmehnle added a commit to jmehnle/githubkit that referenced this issue Jul 20, 2024
Tolerate any string values in `check_suite.app.events` array.

This works around github/rest-api-description#3775.
@dinonuggies1
Copy link
Contributor

Thanks for reporting this, @jmehnle! I've reached out to the internal team that owns this service/update to investigate and address accordingly 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants