webhook

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TemplateErrorText = "failed to render template"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HandleWebhook

type HandleWebhook struct {
	Message          string
	ToBitbucketUsers []string
	ToChannels       []string
}

type PullRequestReviewHandler

type PullRequestReviewHandler interface {
	GetAlreadyNotifiedUsers(pullRequestID int64) ([]string, error)
	SaveNotifiedUsers(int64, []string)
}

type SubscriptionHandler

type SubscriptionHandler interface {
	GetSubscribedChannelsForRepository(webhookpayload.Payload) []*subscription.Subscription
}

type Webhook

type Webhook interface {
	HandleRepoPushEvent(webhookpayload.RepoPushPayload) ([]*HandleWebhook, error)
	HandleIssueCreatedEvent(webhookpayload.IssueCreatedPayload) ([]*HandleWebhook, error)
	HandleIssueUpdatedEvent(webhookpayload.IssueUpdatedPayload) ([]*HandleWebhook, error)
	HandleIssueCommentCreatedEvent(webhookpayload.IssueCommentCreatedPayload) ([]*HandleWebhook, error)
	HandlePullRequestCreatedEvent(webhookpayload.PullRequestCreatedPayload) ([]*HandleWebhook, error)
	HandlePullRequestApprovedEvent(webhookpayload.PullRequestApprovedPayload) ([]*HandleWebhook, error)
	HandlePullRequestDeclinedEvent(webhookpayload.PullRequestDeclinedPayload) ([]*HandleWebhook, error)
	HandlePullRequestUnapprovedEvent(webhookpayload.PullRequestUnapprovedPayload) ([]*HandleWebhook, error)
	HandlePullRequestMergedEvent(webhookpayload.PullRequestMergedPayload) ([]*HandleWebhook, error)
	HandlePullRequestCommentCreatedEvent(webhookpayload.PullRequestCommentCreatedPayload) ([]*HandleWebhook, error)
	HandlePullRequestUpdatedEvent(webhookpayload.PullRequestUpdatedPayload) ([]*HandleWebhook, error)
}

Jump to

Keyboard shortcuts

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