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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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