Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dfc330f6eb | |||
| cdc59eb3ef | |||
| a39ebc145a | |||
| 24279ccb4b | |||
| 4708dcb9f1 | |||
| 3fda9e72e1 | |||
| a610eb250e | |||
| f583341fb8 |
@@ -1,6 +1,6 @@
|
|||||||
Library webhooks
|
Library webhooks
|
||||||
================
|
================
|
||||||
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v5/logo.png">
|
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v5/logo.png">
|
||||||
[](https://travis-ci.org/go-playground/webhooks)
|
[](https://travis-ci.org/go-playground/webhooks)
|
||||||
[](https://coveralls.io/github/go-playground/webhooks?branch=v5)
|
[](https://coveralls.io/github/go-playground/webhooks?branch=v5)
|
||||||
[](https://goreportcard.com/report/go-playground/webhooks)
|
[](https://goreportcard.com/report/go-playground/webhooks)
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
uuid := r.Header.Get("X-Hook-UUID")
|
uuid := r.Header.Get("X-Hook-UUID")
|
||||||
if uuid == "" {
|
if hook.uuid != "" && uuid == "" {
|
||||||
return nil, ErrMissingHookUUIDHeader
|
return nil, ErrMissingHookUUIDHeader
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+28
-26
@@ -2757,19 +2757,20 @@ type PullRequestPayload struct {
|
|||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
SiteAdmin bool `json:"site_admin"`
|
SiteAdmin bool `json:"site_admin"`
|
||||||
} `json:"user"`
|
} `json:"user"`
|
||||||
Body string `json:"body"`
|
Body string `json:"body"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
ClosedAt *time.Time `json:"closed_at"`
|
ClosedAt *time.Time `json:"closed_at"`
|
||||||
MergedAt *time.Time `json:"merged_at"`
|
MergedAt *time.Time `json:"merged_at"`
|
||||||
MergeCommitSha *string `json:"merge_commit_sha"`
|
MergeCommitSha *string `json:"merge_commit_sha"`
|
||||||
Assignee *Assignee `json:"assignee"`
|
Assignee *Assignee `json:"assignee"`
|
||||||
Milestone *Milestone `json:"milestone"`
|
Assignees []*Assignee `json:"assignees"`
|
||||||
CommitsURL string `json:"commits_url"`
|
Milestone *Milestone `json:"milestone"`
|
||||||
ReviewCommentsURL string `json:"review_comments_url"`
|
CommitsURL string `json:"commits_url"`
|
||||||
ReviewCommentURL string `json:"review_comment_url"`
|
ReviewCommentsURL string `json:"review_comments_url"`
|
||||||
CommentsURL string `json:"comments_url"`
|
ReviewCommentURL string `json:"review_comment_url"`
|
||||||
StatusesURL string `json:"statuses_url"`
|
CommentsURL string `json:"comments_url"`
|
||||||
|
StatusesURL string `json:"statuses_url"`
|
||||||
RequestedReviewers []struct {
|
RequestedReviewers []struct {
|
||||||
Login string `json:"login"`
|
Login string `json:"login"`
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
@@ -3694,19 +3695,20 @@ type PullRequestReviewCommentPayload struct {
|
|||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
SiteAdmin bool `json:"site_admin"`
|
SiteAdmin bool `json:"site_admin"`
|
||||||
} `json:"user"`
|
} `json:"user"`
|
||||||
Body string `json:"body"`
|
Body string `json:"body"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
ClosedAt *time.Time `json:"closed_at"`
|
ClosedAt *time.Time `json:"closed_at"`
|
||||||
MergedAt *time.Time `json:"merged_at"`
|
MergedAt *time.Time `json:"merged_at"`
|
||||||
MergeCommitSha string `json:"merge_commit_sha"`
|
MergeCommitSha string `json:"merge_commit_sha"`
|
||||||
Assignee *Assignee `json:"assignee"`
|
Assignee *Assignee `json:"assignee"`
|
||||||
Milestone *Milestone `json:"milestone"`
|
Assignees []*Assignee `json:"assignees"`
|
||||||
CommitsURL string `json:"commits_url"`
|
Milestone *Milestone `json:"milestone"`
|
||||||
ReviewCommentsURL string `json:"review_comments_url"`
|
CommitsURL string `json:"commits_url"`
|
||||||
ReviewCommentURL string `json:"review_comment_url"`
|
ReviewCommentsURL string `json:"review_comments_url"`
|
||||||
CommentsURL string `json:"comments_url"`
|
ReviewCommentURL string `json:"review_comment_url"`
|
||||||
StatusesURL string `json:"statuses_url"`
|
CommentsURL string `json:"comments_url"`
|
||||||
|
StatusesURL string `json:"statuses_url"`
|
||||||
Head struct {
|
Head struct {
|
||||||
Label string `json:"label"`
|
Label string `json:"label"`
|
||||||
Ref string `json:"ref"`
|
Ref string `json:"ref"`
|
||||||
|
|||||||
+9
-1
@@ -177,10 +177,18 @@ type Build struct {
|
|||||||
When string `json:"when"`
|
When string `json:"when"`
|
||||||
Manual bool `json:"manual"`
|
Manual bool `json:"manual"`
|
||||||
User User `json:"user"`
|
User User `json:"user"`
|
||||||
Runner string `json:"runner"`
|
Runner Runner `json:"runner"`
|
||||||
ArtifactsFile ArtifactsFile `json:"artifactsfile"`
|
ArtifactsFile ArtifactsFile `json:"artifactsfile"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Runner represents a runner agent
|
||||||
|
type Runner struct {
|
||||||
|
ID int64 `json:"id"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
Active bool `json:"active"`
|
||||||
|
IsShared bool `json:"is_shared"`
|
||||||
|
}
|
||||||
|
|
||||||
// ArtifactsFile contains all of the GitLab artifact information
|
// ArtifactsFile contains all of the GitLab artifact information
|
||||||
type ArtifactsFile struct {
|
type ArtifactsFile struct {
|
||||||
Filename string `json:"filename"`
|
Filename string `json:"filename"`
|
||||||
|
|||||||
Reference in New Issue
Block a user