Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ad5392160c | |||
| 19cab958b6 | |||
| 78ce03b046 | |||
| ced2e979bc | |||
| d60a03e52a |
@@ -1,6 +1,6 @@
|
|||||||
Library webhooks
|
Library webhooks
|
||||||
================
|
================
|
||||||
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v3/logo.png">
|
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v3/logo.png">
|
||||||
[](https://travis-ci.org/go-playground/webhooks)
|
[](https://travis-ci.org/go-playground/webhooks)
|
||||||
[](https://coveralls.io/github/go-playground/webhooks?branch=v3)
|
[](https://coveralls.io/github/go-playground/webhooks?branch=v3)
|
||||||
[](https://goreportcard.com/report/go-playground/webhooks)
|
[](https://goreportcard.com/report/go-playground/webhooks)
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ type CommitCommentPayload struct {
|
|||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
Body string `json:"body"`
|
Body string `json:"body"`
|
||||||
|
AuthorAssociation string `json:"author_association"`
|
||||||
} `json:"comment"`
|
} `json:"comment"`
|
||||||
Repository struct {
|
Repository struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
@@ -1079,6 +1080,7 @@ type IssueCommentPayload struct {
|
|||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
Body string `json:"body"`
|
Body string `json:"body"`
|
||||||
|
AuthorAssociation string `json:"author_association"`
|
||||||
} `json:"comment"`
|
} `json:"comment"`
|
||||||
Repository struct {
|
Repository struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
@@ -3532,6 +3534,7 @@ type PullRequestReviewCommentPayload struct {
|
|||||||
SiteAdmin bool `json:"site_admin"`
|
SiteAdmin bool `json:"site_admin"`
|
||||||
} `json:"user"`
|
} `json:"user"`
|
||||||
Body string `json:"body"`
|
Body string `json:"body"`
|
||||||
|
AuthorAssociation string `json:"author_association"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
HTMLURL string `json:"html_url"`
|
HTMLURL string `json:"html_url"`
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ type IssueEventPayload struct {
|
|||||||
Repository Repository `json:"repository"`
|
Repository Repository `json:"repository"`
|
||||||
ObjectAttributes ObjectAttributes `json:"object_attributes"`
|
ObjectAttributes ObjectAttributes `json:"object_attributes"`
|
||||||
Assignee Assignee `json:"assignee"`
|
Assignee Assignee `json:"assignee"`
|
||||||
|
Changes Changes `json:"changes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConfidentialIssueEventPayload contains the information for GitLab's confidential issue event
|
// ConfidentialIssueEventPayload contains the information for GitLab's confidential issue event
|
||||||
@@ -52,6 +53,7 @@ type MergeRequestEventPayload struct {
|
|||||||
ObjectKind string `json:"object_kind"`
|
ObjectKind string `json:"object_kind"`
|
||||||
User User `json:"user"`
|
User User `json:"user"`
|
||||||
ObjectAttributes ObjectAttributes `json:"object_attributes"`
|
ObjectAttributes ObjectAttributes `json:"object_attributes"`
|
||||||
|
Changes Changes `json:"changes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PushEventPayload contains the information for GitLab's push event
|
// PushEventPayload contains the information for GitLab's push event
|
||||||
@@ -409,3 +411,28 @@ type Author struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Changes contains all changes associated with a GitLab issue or MR
|
||||||
|
type Changes struct {
|
||||||
|
LabelChanges LabelChanges `json:"labels"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// LabelChanges contains changes in labels assocatiated with a GitLab issue or MR
|
||||||
|
type LabelChanges struct {
|
||||||
|
Previous []Label `json:"previous"`
|
||||||
|
Current []Label `json:"current"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Label contains all of the GitLab label information
|
||||||
|
type Label struct {
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
Title string `json:"title"`
|
||||||
|
Color string `json:"color"`
|
||||||
|
ProjectId int64 `json:"project_id"`
|
||||||
|
CreatedAt customTime `json:"created_at"`
|
||||||
|
UpdatedAt customTime `json:"updated_at"`
|
||||||
|
Template bool `json:"template"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
GroupId int64 `json:"group_id"`
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user