aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-24 12:23:19 -0500
committerUnknwon <u@gogs.io>2017-02-24 12:23:19 -0500
commit6ec859f2b0c1bade67d04f740ec4b9ac9ae0ec98 (patch)
treeee99fa04ae35a085115aa076eb67e192955d8351 /vendor/github.com
parent452551fa23893961ac83dd20b0babef917f42453 (diff)
webhook: send secret with SHA256 HMAC hex digest (#3692)
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/gogits/go-gogs-client/gogs.go2
-rw-r--r--vendor/github.com/gogits/go-gogs-client/repo_hook.go16
2 files changed, 1 insertions, 17 deletions
diff --git a/vendor/github.com/gogits/go-gogs-client/gogs.go b/vendor/github.com/gogits/go-gogs-client/gogs.go
index d98062e4..dae81f10 100644
--- a/vendor/github.com/gogits/go-gogs-client/gogs.go
+++ b/vendor/github.com/gogits/go-gogs-client/gogs.go
@@ -14,7 +14,7 @@ import (
)
func Version() string {
- return "0.12.5"
+ return "0.12.6"
}
// Client represents a Gogs API client.
diff --git a/vendor/github.com/gogits/go-gogs-client/repo_hook.go b/vendor/github.com/gogits/go-gogs-client/repo_hook.go
index 7bec411b..6597be5e 100644
--- a/vendor/github.com/gogits/go-gogs-client/repo_hook.go
+++ b/vendor/github.com/gogits/go-gogs-client/repo_hook.go
@@ -70,7 +70,6 @@ func (c *Client) DeleteRepoHook(user, repo string, id int64) error {
}
type Payloader interface {
- SetSecret(string)
JSONPayload() ([]byte, error)
}
@@ -104,17 +103,12 @@ var (
// \/ \/ \/ \/
type CreatePayload struct {
- Secret string `json:"secret"`
Ref string `json:"ref"`
RefType string `json:"ref_type"`
Repo *Repository `json:"repository"`
Sender *User `json:"sender"`
}
-func (p *CreatePayload) SetSecret(secret string) {
- p.Secret = secret
-}
-
func (p *CreatePayload) JSONPayload() ([]byte, error) {
return json.MarshalIndent(p, "", " ")
}
@@ -148,7 +142,6 @@ func ParseCreateHook(raw []byte) (*CreatePayload, error) {
// PushPayload represents a payload information of push event.
type PushPayload struct {
- Secret string `json:"secret"`
Ref string `json:"ref"`
Before string `json:"before"`
After string `json:"after"`
@@ -159,10 +152,6 @@ type PushPayload struct {
Sender *User `json:"sender"`
}
-func (p *PushPayload) SetSecret(secret string) {
- p.Secret = secret
-}
-
func (p *PushPayload) JSONPayload() ([]byte, error) {
return json.MarshalIndent(p, "", " ")
}
@@ -227,7 +216,6 @@ type ChangesPayload struct {
// PullRequestPayload represents a payload information of pull request event.
type PullRequestPayload struct {
- Secret string `json:"secret"`
Action HookIssueAction `json:"action"`
Index int64 `json:"number"`
Changes *ChangesPayload `json:"changes,omitempty"`
@@ -236,10 +224,6 @@ type PullRequestPayload struct {
Sender *User `json:"sender"`
}
-func (p *PullRequestPayload) SetSecret(secret string) {
- p.Secret = secret
-}
-
func (p *PullRequestPayload) JSONPayload() ([]byte, error) {
return json.MarshalIndent(p, "", " ")
}