Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type WebhookHandler ¶
type WebhookHandler struct {
// contains filtered or unexported fields
}
WebhookHandler handles GitHub webhook events
func NewWebhookHandler ¶
func NewWebhookHandler(ghClient *github.Client, aiClient ai.Client, config *internal.Config, secret string) *WebhookHandler
NewWebhookHandler creates a new webhook handler
func (*WebhookHandler) HandleWebhook ¶
func (h *WebhookHandler) HandleWebhook(w http.ResponseWriter, r *http.Request)
HandleWebhook handles incoming GitHub webhook events
type WebhookPayload ¶
type WebhookPayload struct {
Action string `json:"action"`
Issue struct {
Number int `json:"number"`
Title string `json:"title"`
Body string `json:"body"`
} `json:"issue"`
PullRequest struct {
Number int `json:"number"`
Title string `json:"title"`
Body string `json:"body"`
Head struct {
SHA string `json:"sha"`
} `json:"head"`
} `json:"pull_request"`
Comment struct {
ID int64 `json:"id"`
Body string `json:"body"`
User struct {
Login string `json:"login"`
} `json:"user"`
Path *string `json:"path"` // File path for review comments
Position *int `json:"position"` // Line position for review comments
Line *int `json:"line"` // Line number for review comments
} `json:"comment"`
Repository struct {
FullName string `json:"full_name"`
Name string `json:"name"`
Owner struct {
Login string `json:"login"`
} `json:"owner"`
} `json:"repository"`
}
WebhookPayload represents a GitHub webhook event
Click to show internal directories.
Click to hide internal directories.