Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAuthFailed = errors.New("Auth Failed")
ErrAuthFailed indicates some part of the auth handshake failed
This is usually indicative of an auth failure between the client library and GitHub
Functions ¶
func NewGithubHookHandler ¶
func NewGithubHookHandler(s storage.Store, authors []string, x509Key []byte, opts GithubOpts) gin.HandlerFunc
NewGithubHookHandler creates a GitHub webhook handler.
Types ¶
type GithubOpts ¶
type GithubOpts struct {
// CheckSuiteOnPR will trigger a check suite run for new PRs that pass the security params.
CheckSuiteOnPR bool
AppID int
EmittedEvents []string
}
GithubOpts provides options for configuring a GitHub hook
type Payload ¶
type Payload struct {
Type string `json:"type"`
Token string `json:"token"`
TokenExpires time.Time `json:"tokenExpires"`
Body interface{} `json:"body"`
AppID int `json:"-"`
InstID int `json:"-"`
Commit string `json:"commit"`
Branch string `json:"branch"`
}
Payload represents the data sent as the payload of an event.
Click to show internal directories.
Click to hide internal directories.