probot

package
v0.0.0-...-99e6061 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnterpriseClient

func NewEnterpriseClient(app *App, installation Installation) (*github.Client, error)

NewEnterpriseClient instantiates a new GitHub Client using the App and Installation

func NewMiddleware

func NewMiddleware() mux.MiddlewareFunc

NewMiddleware returns a mux.MiddlewareFunc encapsulating Probot features

Types

type App

type App struct {
	BaseURL string
	ID      int64
	Key     []byte
	Secret  string
}

App encapsulates the fields needed to define a GitHub App

func NewApp

func NewApp() *App

NewApp instantiates a GitHub App from environment variables

type Context

type Context struct {
	App     *App
	Payload interface{}
	GitHub  *github.Client
}

Context encapsulates the fields passed to webhook handlers

func FromContext

func FromContext(context ctx.Context) (*Context, bool)

FromContext exposes probot features to request handlers

func NewContext

func NewContext(app *App) *Context

NewContext instantiates a new context

type Installation

type Installation struct {
	ID int64
}

Installation encapsulates the fields needed to define an installation of a GitHub App

type PayloadInstallation

type PayloadInstallation struct {
	Installation *github.Installation `json:"installation"`
}

PayloadInstallation represents the incoming installation part of the payload

Jump to

Keyboard shortcuts

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