Skip to content

How it works

rndquu edited this page Mar 12, 2024 · 2 revisions

This is a high level overview of how the bot's kernel is interacting with plugins.

Bot's kernel example

The bot's kernel is a github app that listens on github events. On some github event the kernel runs "plugins" which are basically github actions (example). Both composite and js actions are supported.

How it works:

  1. The kernel (github app) is listening for github events
  2. On new incoming event the kernel calls a workflow dispatch event for some plugin (API docs):
  • Example call of plugin workflow (the bot's kernel calls the plugin's workflow)
  • Example plugin workflow which calls composite/js action in the plugin repository (the plugin's workflow calls plugin's github action with business logic)
  • Example of the plugin's github action (i.e. plugin's main business logic)
  1. Plugin finishes execution and calls repository dispatch API on itself (the repo that hosts the plugin) with custom data that should be passed back to the bot's kernel (example). Don't forget to set permissions.
  2. The repository_dispatch event gets sent to the kernel which uses client payload (i.e. plugin execution result) to call the next plugin in the chain.
Clone this wiki locally