saturnbot

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

README

saturn-bot-go

Go SDK to write plugins for saturn-bot.

Take a look at the examples and the documentation to get started.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ptr

func Ptr[T any](t T) *T

func ServePlugin

func ServePlugin(p Plugin)

Types

type BasePlugin

type BasePlugin struct{}

func (BasePlugin) Apply

func (p BasePlugin) Apply(ctx Context) error

func (BasePlugin) Filter

func (p BasePlugin) Filter(ctx Context) (bool, error)

func (BasePlugin) Init

func (p BasePlugin) Init(config map[string]string) error

func (BasePlugin) OnPrClosed

func (p BasePlugin) OnPrClosed(ctx Context) error

func (BasePlugin) OnPrCreated

func (p BasePlugin) OnPrCreated(ctx Context) error

func (BasePlugin) OnPrMerged

func (p BasePlugin) OnPrMerged(ctx Context) error

func (BasePlugin) Priority

func (p BasePlugin) Priority() int32

func (BasePlugin) Shutdown added in v0.6.0

func (p BasePlugin) Shutdown() error

Shutdown executes code to clean up data before the plugin shuts down. The function gets executed once, right before saturn-bot stops the plugin.

type Context added in v0.4.0

type Context struct {
	*protocolv1.Context
}

type Plugin

type Plugin interface {
	Apply(ctx Context) error
	Filter(ctx Context) (bool, error)
	Init(config map[string]string) error
	Name() string
	OnPrClosed(ctx Context) error
	OnPrCreated(ctx Context) error
	OnPrMerged(ctx Context) error
	Priority() int32
	Shutdown() error
}

Directories

Path Synopsis
protocol
v1

Jump to

Keyboard shortcuts

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