Documentation ¶
Overview ¶
Package gh implements bot command to create Github workflow dispatch events.
Index ¶
- func NewTokenClient(token string, mp metric.MeterProvider, tp trace.TracerProvider) *github.Client
- type Check
- type ComponentUpdate
- type Event
- type Hook
- type PullRequestUpdate
- type StatusComponent
- type StatusMeta
- type StatusPage
- type StatusWebhook
- type Webhook
- func (w *Webhook) Client(ctx context.Context) (*github.Client, error)
- func (w *Webhook) Handle(ctx context.Context, t string, data []byte) (rerr error)
- func (w *Webhook) HasSecret() bool
- func (w *Webhook) RegisterRoutes(e *echo.Echo)
- func (w *Webhook) Run(ctx context.Context) error
- func (w *Webhook) WithCache(c *redis.Client) *Webhook
- func (w *Webhook) WithNotifyGroup(domain string) *Webhook
- func (w *Webhook) WithSecret(v string) *Webhook
- func (w *Webhook) WithSender(sender *message.Sender) *Webhook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTokenClient ¶
func NewTokenClient(token string, mp metric.MeterProvider, tp trace.TracerProvider) *github.Client
NewTokenClient returns new instrumented GitHub client with token and rate limiter.
Types ¶
type ComponentUpdate ¶
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook is event handler which saves last message ID of dialog to the storage.
func NewHook ¶
func NewHook(next dispatch.MessageHandler, db *ent.LastChannelMessageClient) Hook
NewHook creates new hook.
type PullRequestUpdate ¶
type PullRequestUpdate struct { // Possible values: pr_update, check_update Event string // Possible values for Event == "update": opened, merged Action string Repo *github.Repository PR *github.PullRequest Checks []Check }
func (PullRequestUpdate) ActionIn ¶
func (u PullRequestUpdate) ActionIn(actions ...string) bool
type StatusComponent ¶
type StatusMeta ¶
type StatusPage ¶
type StatusWebhook ¶
type StatusWebhook struct { Meta StatusMeta `json:"meta"` Page StatusPage `json:"page"` ComponentUpdate ComponentUpdate `json:"component_update"` Component StatusComponent `json:"component"` }
type Webhook ¶
type Webhook struct {
// contains filtered or unexported fields
}
Webhook is a Github events web hook handler.
func NewWebhook ¶
func NewWebhook( db *ent.Client, gh *github.Client, ghID int64, sender *message.Sender, meterProvider metric.MeterProvider, tracerProvider trace.TracerProvider, ) *Webhook
NewWebhook creates new web hook handler.
func (*Webhook) RegisterRoutes ¶
func (w *Webhook) RegisterRoutes(e *echo.Echo)
RegisterRoutes registers hook using given Echo router.
func (*Webhook) WithNotifyGroup ¶
WithNotifyGroup sets channel name to send notifications.
func (*Webhook) WithSecret ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.