Open
Description
Schema Inaccuracy
The secret-scanning-alert-webhook
schema component, used by the alert
field of the webhook-secret-scanning-alert-*
webhooks (e.g. webhook-secret-scanning-alert-created
, does not have any required fields.
The alert
is the subject of the webhook and is never optional. Many of the fields of the alert
are primary keys or other required elements, such as number
, created_at
, updated_at
, url
, html_url
, and many more.
Expected
The alert
field of all of the webhook-secret-scanning-alert-
webhooks should have required properties.
Reproduction Steps
Discovered by using TypeScript and reviewing the code of the ghec
REST API descriptions. Using code, it can be discovered by:
import { webhooks } from '@octokit/openapi-webhooks-types-ghec'
type SecretScanningAlertCreatedEvent = webhooks['secret-scanning-alert-created']['post']['requestBody']['content']['application/json'];
const event: SecretScanningAlertCreatedEvent;
// Review type of event - all fields have a type that includes `| undefined`