cistarlark

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToWorkflow added in v0.11.0

func ConvertToWorkflow(v starlark.Value) (*workflow.Workflow, error)

func DefaultBuiltIns added in v0.11.0

func DefaultBuiltIns() map[string]starlark.StringDict

func LoadWorkflow added in v0.11.0

func LoadWorkflow(ctx context.Context, hc *http.Client, fn string, ciContext WorkflowContext, cfg Config) (*workflow.Workflow, error)

func MakeLoad

func MakeLoad(src modOpener) func(thread *starlark.Thread, module string) (starlark.StringDict, error)

Types

type Config added in v0.11.0

type Config struct {
	// BuiltIns modules loaded via the "builtin:///"
	BuiltIns map[string]starlark.StringDict
	// Predeclared global variables
	Predeclared starlark.StringDict
	// Print function for user feedback
	Print PrintFunc
}

type GithubEvent added in v0.11.0

type GithubEvent interface {
	GetInstallation() *github.Installation
	GetRepo() *github.Repository
	GetSender() *github.User
}

type PrintFunc added in v0.11.0

type PrintFunc func(_ *starlark.Thread, msg string)

type WorkflowContext added in v0.11.0

type WorkflowContext struct {
	Repo        *github.Repository
	Entrypoint  string
	Ref         string
	RefType     string
	SHA         string
	ContextData map[string]string
	PRs         []*github.PullRequest
	Event       GithubEvent
}

Jump to

Keyboard shortcuts

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