Comments (3)
Do you have to use got
? If you used e.g. @octokit/core
you'd get typings for free.
You can get types for REST API endpoints by importing from @octokit/types
import type { Endpoints } from "@octokit/types"
type CreateWebhookResponseData = Endpoints["POST /repos/{owner}/{repo}/hooks"]["response"]["data"]
const result = await got<CreateWebhookResponseData>(`${GITHUB_API_BASE}/repos/${owner}/${repo}/hooks`, {
// ...
});
from webhooks.
Because there isn't such webhook. That would be a GitHub event
On the webhooks side there is the ping
event that gets fired when a new webhook is created
from webhooks.
@gr2m that works perfectly!
Is there any reason we can't have a WebhookCreatedEvent
within the @octokit/webhooks-types
?
from webhooks.
Related Issues (20)
- Changes object can be undefined HOT 2
- Changes object has 19 possible keys but type is defined with only 3 of them HOT 5
- InstallationSuspendEvent installation property is typed to 'never' HOT 3
- Document that `strictNullChecks` is required to be enabled HOT 2
- Missing events HOT 4
- [BUG]: Remove required 'test' Check Run from repository HOT 2
- [BUG]: ProjectsV2Item and archived_at for created/converted events HOT 2
- [BUG]: invalid organization format in schema for repository HOT 7
- [BUG]: InstallationUnsuspendEvent.installation is never HOT 9
- [BUG]: Incorrect secret_scanning_alert values (OpenAPI schema) HOT 2
- [BUG]: `registry_package` is missing `installation` object HOT 2
- [BUG]: Type changed for `installation_repositories` event HOT 5
- [BUG]: `pull_request.auto_merge` properties should allow string or null HOT 6
- Add missing `merge_queue_entry` event HOT 1
- [MAINT]: Release is failing HOT 4
- [BUG]: Property 'title' does not exist on type 'never'. The intersection 'Issue & { state: "open"; closed_at: null; }' was reduced to 'never' because property 'closed_at' has conflicting types in some constituents. HOT 2
- [BUG]: completed workflow steps should have "cancelled" as possible conclusion HOT 2
- [BUG]: Pull request opened event JSON schema doesn't pass validation with AJV HOT 4
- Deprecating repository and packages HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webhooks.