added webhook validation

This commit is contained in:
ston1th 2019-12-14 14:48:41 +01:00
commit dd88498e0d
6 changed files with 158 additions and 21 deletions

View file

@ -6,6 +6,7 @@ type PullRequestBody struct {
Action string `json:"action"`
Number int64 `json:"number"`
PullRequest PullRequest `json:"pull_request"`
Repository Repository `json:"repository"`
}
type PullRequest struct {
@ -32,8 +33,9 @@ type PostLabelsInt struct {
}
type PushBody struct {
Ref string `json:"ref"`
After string `json:"after"`
Ref string `json:"ref"`
After string `json:"after"`
Repository Repository `json:"repository"`
}
type CommentBody struct {
@ -54,6 +56,7 @@ type Comment struct {
type Repository struct {
Name string `json:"name"`
FullName string `json:"full_name"`
Owner Owner `json:"owner"`
CloneURL string `json:"clone_url"`
}