webhook

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubHTTPHandler added in v0.3.7

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

func NewZenhubHTTPHandler added in v0.3.7

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

Types

type GitHubAppsClientFunc added in v0.2.0

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 added in v0.3.7

type IssueTransfer struct {
	ZenhubAction
	From string
	To   string
}

func (*IssueTransfer) FieldMap added in v0.3.7

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

type Zenhub added in v0.3.7

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

func ParseZenhub added in v0.3.7

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

type ZenhubAction added in v0.3.7

type ZenhubAction struct {
	Type        string
	IssueNumber string
}

func (ZenhubAction) GetIssue added in v0.3.7

func (z ZenhubAction) GetIssue() string

func (ZenhubAction) GetType added in v0.3.7

func (z ZenhubAction) GetType() string

type ZenhubIssue added in v0.3.7

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

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

type ZenhubPipeline added in v0.3.7

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