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

[BUG]: webhooks-types is missing all installation events in WebhookEvents type #979

Open
1 task done
robcresswell opened this issue Dec 27, 2024 · 6 comments
Open
1 task done
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@robcresswell
Copy link

What happened?

Maybe I'm misunderstanding, but in the webhooks-types packages, the WebhookEvents type seems to have... some of the webhook events but is missing several, notably the GitHub App installation ones.

Versions

@octokit/webhooks-types 7.6.1

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@robcresswell robcresswell added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Dec 27, 2024
Copy link
Contributor

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@robcresswell
Copy link
Author

I think I'm supposed to use WebhookEventName instead?

@wolfy1339
Copy link
Member

I'm not completely sure what you are referring to. Can you provide more context?

What event are you referring to, what property?

@robcresswell
Copy link
Author

In the webhooks-types packages, there is a type called WebhookEvents, which I assumed was supposed to be all the events, but it does not include things like Installation. I then subsequently realised there is a WebhookEventName type which I guess is what I was looking for?

@wolfy1339
Copy link
Member

wolfy1339 commented Dec 27, 2024

The WebhookEvent type is for the installation event, the ping event, and the meta.deleted event.

It only includes the top-level events and not the different sub-events.

This repository isn't up to date with the current webhooks

@robcresswell
Copy link
Author

robcresswell commented Dec 27, 2024

I'm even more confused now 😅

If I go to https://docs.github.com/en/webhooks/webhook-events-and-payloads this seems to mostly align with the WebhookEvents type, which is:

export type WebhookEvents =
  | (
      | "branch_protection_rule"
      | "check_run"
      | "check_suite"
      | "code_scanning_alert"
      | "commit_comment"
      | "create"
      | "delete"
      | "deployment"
      | "deployment_status"
      | "deploy_key"
      | "discussion"
      | "discussion_comment"
      | "fork"
      | "gollum"
      | "issues"
      | "issue_comment"
      | "label"
      | "member"
      | "membership"
      | "meta"
      | "milestone"
      | "organization"
      | "org_block"
      | "package"
      | "page_build"
      | "project"
      | "projects_v2_item"
      | "project_card"
      | "project_column"
      | "public"
      | "pull_request"
      | "pull_request_review"
      | "pull_request_review_comment"
      | "pull_request_review_thread"
      | "push"
      | "registry_package"
      | "release"
      | "repository"
      | "repository_import"
      | "repository_vulnerability_alert"
      | "secret_scanning_alert"
      | "secret_scanning_alert_location"
      | "security_and_analysis"
      | "star"
      | "status"
      | "team"
      | "team_add"
      | "watch"
      | "workflow_job"
      | "workflow_run"
    )[]
  | ["*"];

except this misses several of the events, such as installation

So I'm confused about what this type is supposed to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
Status: 🆕 Triage
Development

No branches or pull requests

2 participants