Documentation
¶
Overview ¶
Package webhook handles GitLab webhook events for the reviewer roulette system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles GitLab webhook events
func NewHandler ¶
func NewHandler( cfg *config.Config, gitlabClient *gitlab.Client, mattermostClient *mattermost.Client, rouletteService *roulette.Service, metricsService *metrics.Service, userRepo *repository.UserRepository, reviewRepo *repository.ReviewRepository, translator *i18n.Translator, log *logger.Logger, ) *Handler
NewHandler creates a new webhook handler
func (*Handler) HandleGitLabWebhook ¶
HandleGitLabWebhook processes GitLab webhook events
type MergeRequestEvent ¶
type MergeRequestEvent struct {
ObjectKind string `json:"object_kind"`
Project struct {
ID int `json:"id"`
} `json:"project"`
ObjectAttributes struct {
IID int `json:"iid"`
Title string `json:"title"`
URL string `json:"url"`
State string `json:"state"`
Action string `json:"action"`
} `json:"object_attributes"`
}
MergeRequestEvent represents a GitLab merge request event
type NoteEvent ¶
type NoteEvent struct {
ObjectKind string `json:"object_kind"`
User struct {
ID int `json:"id"`
Username string `json:"username"`
} `json:"user"`
ProjectID int `json:"project_id"`
Project struct {
ID int `json:"id"`
} `json:"project"`
ObjectAttributes struct {
ID int `json:"id"`
Note string `json:"note"`
NoteableType string `json:"noteable_type"`
NoteableID int `json:"noteable_id"`
} `json:"object_attributes"`
MergeRequest struct {
IID int `json:"iid"`
Title string `json:"title"`
URL string `json:"url"`
} `json:"merge_request"`
}
NoteEvent represents a GitLab note (comment) event
Click to show internal directories.
Click to hide internal directories.