Categorygithub.com/konstellation-io/kai-processes/github-webhook-trigger
modulepackage
0.2.0
Repository: https://github.com/konstellation-io/kai-processes.git
Documentation: pkg.go.dev

# README

Github webhook trigger

The github webhook trigger is a predefined KAI process that creates a github webhook passive listener. It will stay listening for user requested events, then trigger a KAI workflow on said event.
The trigger supports the following event types:

  • push
  • pull
  • release
  • workflow_dispatch
  • workflow_run

How to setup

The trigger requires adding two configuration options to the process-scoped configuration. One being the events the webhook will listen to (webhook_events), the other the github secret needed to interact with the github repo (github_secret).

! Github repository needs to be configured also to expose events to the webhook please check webhook_guide for more information.

Configuration

KeyOptionalTypeValue
webhook_eventsnostrPossible options (comma separated): push, pull, release, workflow_dispatch, workflow_run
github_secretyesstrGithub's repository secret.

Output

KeyTypeValue
requestIDstrA string uuid
eventUrlstrThe url from the repo triggering the event
eventstrThe name of the event that has occurred

The url can be defined in https://github.com/<YOUR_REPOSITORY>/settings/hooks

Example

{
 "requestID": "123",
 "eventUrl": "http:://example/webhook-github",
 "event": "push"
}