webhook

package
v0.0.0-...-c5e587c Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubHTTPHandler

func NewGithubHTTPHandler(cfg config.WebhookConfig, config config.Config, logger *zap.Logger) (http.HandlerFunc, error)

func NewZenhubHTTPHandler

func NewZenhubHTTPHandler(cfg config.WebhookConfig, config config.Config, logger *zap.Logger) (http.HandlerFunc, error)

Types

type GitHubAppsClientFunc

type GitHubAppsClientFunc func(installationID int) (*github.Client, error)

type Handler

type Handler interface {
	HandleEvent(eventObject interface{}, client *github.Client, config config.RepoConfig, logger *zap.Logger) error

	EventTypesHandled() []string
}

type IssueTransfer

type IssueTransfer struct {
	ZenhubAction
	From string
	To   string
}

func (*IssueTransfer) FieldMap

func (i *IssueTransfer) FieldMap(req *http.Request) binding.FieldMap

type Zenhub

type Zenhub interface {
	GetType() string
	GetIssue() string
}

func ParseZenhub

func ParseZenhub(r *http.Request, logger *zap.Logger) (Zenhub, error)

type ZenhubAction

type ZenhubAction struct {
	Type        string
	IssueNumber string
}

func (ZenhubAction) GetIssue

func (z ZenhubAction) GetIssue() string

func (ZenhubAction) GetType

func (z ZenhubAction) GetType() string

type ZenhubIssue

type ZenhubIssue struct {
	Pipeline ZenhubPipeline `json:"pipeline"`
	IsEpic   bool           `json:"is_epic"`
}

{"plus_ones":[],"pipeline":{"name":"New Issues"},"is_epic":false}

type ZenhubPipeline

type ZenhubPipeline struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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