Documentation ¶
Index ¶
- Constants
- func FormatICResponse(ic github.IssueComment, s string) string
- func FormatResponseRaw(body, bodyURL, login, reply string) string
- func RegisterIssueCommentHandler(name string, fn IssueCommentHandler)
- func RegisterIssueHandler(name string, fn IssueHandler)
- func RegisterPullRequestHandler(name string, fn PullRequestHandler)
- func RegisterPushEventHandler(name string, fn PushEventHandler)
- func RegisterReviewCommentEventHandler(name string, fn ReviewCommentEventHandler)
- func RegisterReviewEventHandler(name string, fn ReviewEventHandler)
- func RegisterStatusEventHandler(name string, fn StatusEventHandler)
- type IssueCommentHandler
- type IssueHandler
- type PluginAgent
- func (pa *PluginAgent) IssueCommentHandlers(owner, repo string) map[string]IssueCommentHandler
- func (pa *PluginAgent) IssueHandlers(owner, repo string) map[string]IssueHandler
- func (pa *PluginAgent) Load(path string) error
- func (pa *PluginAgent) PullRequestHandlers(owner, repo string) map[string]PullRequestHandler
- func (pa *PluginAgent) PushEventHandlers(owner, repo string) map[string]PushEventHandler
- func (pa *PluginAgent) ReviewCommentEventHandlers(owner, repo string) map[string]ReviewCommentEventHandler
- func (pa *PluginAgent) ReviewEventHandlers(owner, repo string) map[string]ReviewEventHandler
- func (pa *PluginAgent) Start(path string) error
- func (pa *PluginAgent) StatusEventHandlers(owner, repo string) map[string]StatusEventHandler
- type PluginClient
- type PullRequestHandler
- type PushEventHandler
- type ReviewCommentEventHandler
- type ReviewEventHandler
- type StatusEventHandler
Constants ¶
const AboutThisBot = AboutThisBotWithoutCommands + " " + AboutThisBotCommands
const AboutThisBotCommands = "I understand the commands that are listed [here](https://github.com/kubernetes/test-infra/blob/master/commands.md)."
const AboutThisBotWithoutCommands = "" /* 369-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func FormatICResponse ¶
func FormatICResponse(ic github.IssueComment, s string) string
FormatICResponse nicely formats a response to an issue comment.
func FormatResponseRaw ¶
FormatResponseRaw nicely formats a response for one does not have an issue comment
func RegisterIssueCommentHandler ¶
func RegisterIssueCommentHandler(name string, fn IssueCommentHandler)
func RegisterIssueHandler ¶
func RegisterIssueHandler(name string, fn IssueHandler)
func RegisterPullRequestHandler ¶
func RegisterPullRequestHandler(name string, fn PullRequestHandler)
func RegisterPushEventHandler ¶
func RegisterPushEventHandler(name string, fn PushEventHandler)
func RegisterReviewCommentEventHandler ¶
func RegisterReviewCommentEventHandler(name string, fn ReviewCommentEventHandler)
func RegisterReviewEventHandler ¶
func RegisterReviewEventHandler(name string, fn ReviewEventHandler)
func RegisterStatusEventHandler ¶
func RegisterStatusEventHandler(name string, fn StatusEventHandler)
Types ¶
type IssueCommentHandler ¶
type IssueCommentHandler func(PluginClient, github.IssueCommentEvent) error
type IssueHandler ¶
type IssueHandler func(PluginClient, github.IssueEvent) error
type PluginAgent ¶
type PluginAgent struct { PluginClient // contains filtered or unexported fields }
func (*PluginAgent) IssueCommentHandlers ¶
func (pa *PluginAgent) IssueCommentHandlers(owner, repo string) map[string]IssueCommentHandler
IssueCommentHandlers returns a map of plugin names to handlers for the repo.
func (*PluginAgent) IssueHandlers ¶
func (pa *PluginAgent) IssueHandlers(owner, repo string) map[string]IssueHandler
IssueHandlers returns a map of plugin names to handlers for the repo.
func (*PluginAgent) Load ¶
func (pa *PluginAgent) Load(path string) error
Load attempts to load config from the path. It returns an error if either the file can't be read or it contains an unknown plugin.
func (*PluginAgent) PullRequestHandlers ¶
func (pa *PluginAgent) PullRequestHandlers(owner, repo string) map[string]PullRequestHandler
PullRequestHandlers returns a map of plugin names to handlers for the repo.
func (*PluginAgent) PushEventHandlers ¶
func (pa *PluginAgent) PushEventHandlers(owner, repo string) map[string]PushEventHandler
PushEventHandlers returns a map of plugin names to handlers for the repo.
func (*PluginAgent) ReviewCommentEventHandlers ¶
func (pa *PluginAgent) ReviewCommentEventHandlers(owner, repo string) map[string]ReviewCommentEventHandler
ReviewCommentEventHandlers returns a map of plugin names to handlers for the repo.
func (*PluginAgent) ReviewEventHandlers ¶
func (pa *PluginAgent) ReviewEventHandlers(owner, repo string) map[string]ReviewEventHandler
ReviewEventHandlers returns a map of plugin names to handlers for the repo.
func (*PluginAgent) Start ¶
func (pa *PluginAgent) Start(path string) error
Start starts polling path for plugin config. If the first attempt fails, then start returns the error. Future errors will halt updates but not stop.
func (*PluginAgent) StatusEventHandlers ¶
func (pa *PluginAgent) StatusEventHandlers(owner, repo string) map[string]StatusEventHandler
StatusEventHandlers returns a map of plugin names to handlers for the repo.
type PluginClient ¶
type PluginClient struct { GitHubClient *github.Client KubeClient *kube.Client SlackClient *slack.Client // This might be nil. Config *config.Config Logger *logrus.Entry }
PluginClient may be used concurrently, so each entry must be thread-safe.
type PullRequestHandler ¶
type PullRequestHandler func(PluginClient, github.PullRequestEvent) error
type PushEventHandler ¶
type PushEventHandler func(PluginClient, github.PushEvent) error
type ReviewCommentEventHandler ¶
type ReviewCommentEventHandler func(PluginClient, github.ReviewCommentEvent) error
type ReviewEventHandler ¶
type ReviewEventHandler func(PluginClient, github.ReviewEvent) error
type StatusEventHandler ¶
type StatusEventHandler func(PluginClient, github.StatusEvent) error