cherrypicker

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "ti-community-cherrypicker"

Variables

This section is empty.

Functions

func HelpProvider

HelpProvider constructs the PluginHelp for this plugin that takes into account enabled repositories. HelpProvider defines the type for function that construct the PluginHelp for plugins.

Types

type Server

type Server struct {
	WebhookSecretGenerator func() []byte
	GitHubTokenGenerator   func() []byte
	BotUser                *github.UserData
	Email                  string

	GitClient git.ClientFactory
	// Used for unit testing
	Push         func(forkName, newBranch string, force bool) error
	GitHubClient githubClient
	Log          *logrus.Entry
	ConfigAgent  *tiexternalplugins.ConfigAgent

	Bare      *http.Client
	PatchURL  string
	GitHubURL string

	Repos []github.Repo
	// contains filtered or unexported fields
}

Server implements http.Handler. It validates incoming GitHub webhooks and then dispatches them to the appropriate plugins.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP validates an incoming webhook and puts it into the event channel.

Jump to

Keyboard shortcuts

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