Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ad5392160c | |||
| 19cab958b6 | |||
| 78ce03b046 | |||
| ced2e979bc | |||
| d60a03e52a |
@@ -1,6 +1,6 @@
|
||||
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://coveralls.io/github/go-playground/webhooks?branch=v3)
|
||||
[](https://goreportcard.com/report/go-playground/webhooks)
|
||||
|
||||
+19
-16
@@ -28,13 +28,14 @@ type CommitCommentPayload struct {
|
||||
Type string `json:"type"`
|
||||
SiteAdmin bool `json:"site_admin"`
|
||||
} `json:"user"`
|
||||
Position *int64 `json:"position"`
|
||||
Line *int64 `json:"line"`
|
||||
Path *string `json:"path"`
|
||||
CommitID string `json:"commit_id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Body string `json:"body"`
|
||||
Position *int64 `json:"position"`
|
||||
Line *int64 `json:"line"`
|
||||
Path *string `json:"path"`
|
||||
CommitID string `json:"commit_id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Body string `json:"body"`
|
||||
AuthorAssociation string `json:"author_association"`
|
||||
} `json:"comment"`
|
||||
Repository struct {
|
||||
ID int64 `json:"id"`
|
||||
@@ -1076,9 +1077,10 @@ type IssueCommentPayload struct {
|
||||
Type string `json:"type"`
|
||||
SiteAdmin bool `json:"site_admin"`
|
||||
} `json:"user"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Body string `json:"body"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Body string `json:"body"`
|
||||
AuthorAssociation string `json:"author_association"`
|
||||
} `json:"comment"`
|
||||
Repository struct {
|
||||
ID int64 `json:"id"`
|
||||
@@ -3531,12 +3533,13 @@ type PullRequestReviewCommentPayload struct {
|
||||
Type string `json:"type"`
|
||||
SiteAdmin bool `json:"site_admin"`
|
||||
} `json:"user"`
|
||||
Body string `json:"body"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
HTMLURL string `json:"html_url"`
|
||||
PullRequestURL string `json:"pull_request_url"`
|
||||
Links struct {
|
||||
Body string `json:"body"`
|
||||
AuthorAssociation string `json:"author_association"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
HTMLURL string `json:"html_url"`
|
||||
PullRequestURL string `json:"pull_request_url"`
|
||||
Links struct {
|
||||
Self struct {
|
||||
Href string `json:"href"`
|
||||
} `json:"self"`
|
||||
|
||||
@@ -38,6 +38,7 @@ type IssueEventPayload struct {
|
||||
Repository Repository `json:"repository"`
|
||||
ObjectAttributes ObjectAttributes `json:"object_attributes"`
|
||||
Assignee Assignee `json:"assignee"`
|
||||
Changes Changes `json:"changes"`
|
||||
}
|
||||
|
||||
// ConfidentialIssueEventPayload contains the information for GitLab's confidential issue event
|
||||
@@ -52,6 +53,7 @@ type MergeRequestEventPayload struct {
|
||||
ObjectKind string `json:"object_kind"`
|
||||
User User `json:"user"`
|
||||
ObjectAttributes ObjectAttributes `json:"object_attributes"`
|
||||
Changes Changes `json:"changes"`
|
||||
}
|
||||
|
||||
// PushEventPayload contains the information for GitLab's push event
|
||||
@@ -409,3 +411,28 @@ type Author struct {
|
||||
Name string `json:"name"`
|
||||
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