Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 24279ccb4b | |||
| 4708dcb9f1 | |||
| 3fda9e72e1 | |||
| a610eb250e | |||
| f583341fb8 |
@@ -1,6 +1,6 @@
|
||||
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://coveralls.io/github/go-playground/webhooks?branch=v5)
|
||||
[](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")
|
||||
if uuid == "" {
|
||||
if hook.uuid != "" && uuid == "" {
|
||||
return nil, ErrMissingHookUUIDHeader
|
||||
}
|
||||
|
||||
|
||||
+9
-1
@@ -177,10 +177,18 @@ type Build struct {
|
||||
When string `json:"when"`
|
||||
Manual bool `json:"manual"`
|
||||
User User `json:"user"`
|
||||
Runner string `json:"runner"`
|
||||
Runner Runner `json:"runner"`
|
||||
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
|
||||
type ArtifactsFile struct {
|
||||
Filename string `json:"filename"`
|
||||
|
||||
Reference in New Issue
Block a user