generate-webhook-events
This is a script for generating all_webhooks.go
.
It does:
- Fetch the official markdown document
- Parse the markdown file and find Webhook names and their types from tables
- Generate mappings from Webhook names to their types as 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 markdown file is in local:
go run ./scripts/generate-webhook-events ./events-that-trigger-workflows.md ./all_webhooks.go
For debugging, specifying -
to dstfile
outputs the generated source to stdout:
go run ./scripts/generate-webhook-events -