Skip to content

feat: add validate-event-name #1161

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

Merged
merged 4 commits into from
Jun 29, 2025

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Jun 29, 2025

Migrating a modified validateEventName typeguard/typeassertion from Probot to webhooks.js

Resolves #ISSUE_NUMBER


Before the change?

Currently the logic to validate the input of the eventName is in .on() method. It is impossible to reuse it.

After the change?

There are no behavioral changes. I just extracted the logic into the new validateEventName. I added a onUnkownEventName and logger option, to make it possible to use it as a stricter typeguard/typeassertion in other projects.

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

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! 🚀

@wolfy1339 wolfy1339 merged commit 6965d70 into octokit:main Jun 29, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Active Jun 29, 2025
Copy link
Contributor

🎉 This PR is included in version 14.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Uzlopak Uzlopak deleted the integrate-validate-event-name branch June 29, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants