webhook-interceptor/types.go
2019-12-14 14:48:41 +01:00

66 lines
1.3 KiB
Go

// Copyright (C) 2019 Marius Schellenberger
package main
type PullRequestBody struct {
Action string `json:"action"`
Number int64 `json:"number"`
PullRequest PullRequest `json:"pull_request"`
Repository Repository `json:"repository"`
}
type PullRequest struct {
Head Head `json:"head"`
Labels []Label `json:"labels"`
}
type Head struct {
SHA string `json:"sha"`
}
type Label struct {
ID int64 `json:"id"`
Color string `json:"color"`
Name string `json:"name"`
}
type PostLabelsString struct {
Labels []string `json:"labels"`
}
type PostLabelsInt struct {
Labels []int64 `json:"labels"`
}
type PushBody struct {
Ref string `json:"ref"`
After string `json:"after"`
Repository Repository `json:"repository"`
}
type CommentBody struct {
Action string `json:"action"`
Issue Issue `json:"issue"`
Comment Comment `json:"comment"`
Repository Repository `json:"repository"`
}
type Issue struct {
Number int64 `json:"number"`
Labels []Label `json:"labels"`
}
type Comment struct {
Body string `json:"body"`
}
type Repository struct {
Name string `json:"name"`
FullName string `json:"full_name"`
Owner Owner `json:"owner"`
CloneURL string `json:"clone_url"`
}
type Owner struct {
Login string `json:"login"`
}