dispatcher

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterJobs added in v0.3.0

func FilterJobs(cand []cicdv1.Job, evType git.EventType, ref string) []cicdv1.Job

FilterJobs filters job depending on the events, and ref

func GeneratePostSubmit added in v0.2.0

func GeneratePostSubmit(push *git.Push, repo *git.Repository, sender *git.User, config *cicdv1.IntegrationConfig) *cicdv1.IntegrationJob

GeneratePostSubmit generates IntegrationJob for push event

func GeneratePreSubmit added in v0.2.0

func GeneratePreSubmit(pr *git.PullRequest, repo *git.Repository, sender *git.User, config *cicdv1.IntegrationConfig) *cicdv1.IntegrationJob

GeneratePreSubmit generates IntegrationJob for pull request event

Types

type Dispatcher

type Dispatcher struct {
	Client client.Client
}

Dispatcher dispatches IntegrationJob when webhook is called A kind of 'plugin' for webhook handler

func (Dispatcher) Handle

func (d Dispatcher) Handle(webhook *git.Webhook, config *cicdv1.IntegrationConfig) error

Handle handles pull-request and push events

Jump to

Keyboard shortcuts

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