generate-webhook-events

command
v1.7.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 11 Imported by: 0

README

generate-webhook-events

This is a script for generating all_webhooks.go.

It does:

  1. Fetch the GitHub Docs HTML page
  2. Parse the HTML and find webhook names and their activity types from tables
  3. Generate mappings from webhook names to their activity types as a Go map variable

Usage

generate-webhook-events [[srcfile] dstfile]

Generate all_webhooks.go file:

go run ./scripts/generate-webhook-events ./all_webhooks.go

When the HTML file is in local:

go run ./scripts/generate-webhook-events ./input.html ./all_webhooks.go

For debugging, specifying - to dstfile outputs the generated source to stdout:

go run ./scripts/generate-webhook-events ./input.html -

Notes

  • Not applicable activity types are generated as an empty slice: []string{}
  • Custom activity types are generated as nil
  • The output is sorted by webhook name so the generated file is stable

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL