Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 895 Bytes

File metadata and controls

35 lines (23 loc) · 895 Bytes

generate-webhook-events

This is a script for generating all_webhooks.go.

It does:

  1. Fetch the official markdown document
  2. Parse the markdown file and find Webhook names and their types from tables
  3. 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 -