Documentation
¶
Index ¶
- Variables
- func ProcessComment(event *github.IssueCommentEvent, client *github.Client, logger *slog.Logger)
- func RegisterEventHandlers(r *gin.Engine, client *github.Client, logger *slog.Logger, ...) func(string, []byte)
- type CommandDef
- type LabelDef
- type PREventDef
- type ProwGitHubClient
- type ProwLiteGitHubClient
Constants ¶
This section is empty.
Variables ¶
View Source
var Commands = func() []CommandDef { defs := make([]CommandDef, len(dispatchTable)) for i, ch := range dispatchTable { defs[i] = ch.def } return defs }()
Commands exposes the command definitions for doc generation.
View Source
var EventPluginLabels = []LabelDef{
{Name: "lgtm", Meaning: "PR has been approved."},
{Name: "do-not-merge", Meaning: "PR is not ready to merge."},
}
EventPluginLabels documents the labels used by the event plugin.
View Source
var PREvents = []PREventDef{
{
Action: "opened",
Behavior: "Adds `do-not-merge` label; creates LGTM check run with `neutral` conclusion.",
},
{
Action: "reopened",
Behavior: "Adds `do-not-merge`, removes `lgtm`, posts an approval-reset comment, and creates an LGTM check run with `neutral` conclusion.",
},
}
PREvents documents the pull_request webhook actions handled by the event plugin.
Functions ¶
func ProcessComment ¶
Types ¶
type CommandDef ¶ added in v0.3.0
type CommandDef struct {
// Triggers are the slash-command prefixes that activate this command.
Triggers []string
Description string
// Usage shows the full invocation syntax.
Usage string
}
CommandDef describes a slash command handled by the event plugin.
type PREventDef ¶ added in v0.3.0
PREventDef documents a pull_request webhook action handled by the event plugin.
type ProwGitHubClient ¶
type ProwGitHubClient interface {
GetClient() *github.Client
CreateCheckRun(ctx context.Context, owner, repo string, opt github.CreateCheckRunOptions) (*github.CheckRun, *github.Response, error)
}
ProwGitHubClient is the interface consumed by callers that need a GitHub client.
type ProwLiteGitHubClient ¶
type ProwLiteGitHubClient struct {
// contains filtered or unexported fields
}
ProwLiteGitHubClient wraps a GitHub client authenticated as a GitHub App installation.
func NewGithubClient ¶
func NewGithubClient(logger *slog.Logger) (*ProwLiteGitHubClient, error)
func (*ProwLiteGitHubClient) CreateCheckRun ¶
func (*ProwLiteGitHubClient) GetClient ¶
func (g *ProwLiteGitHubClient) GetClient() *github.Client
Source Files
¶
Click to show internal directories.
Click to hide internal directories.