aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gogits
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-09 04:11:23 -0500
committerUnknwon <u@gogs.io>2017-03-09 04:11:23 -0500
commit89cc6aa430c65b87808ee4a159e0a80785b51935 (patch)
tree20ac897b69822337a02796ec7a8d9951bd0c285d /vendor/github.com/gogits
parentc93731339f3da01bb1158acc7acf781f0dfe2468 (diff)
webhook: add issue comment event
Diffstat (limited to 'vendor/github.com/gogits')
-rw-r--r--vendor/github.com/gogits/go-gogs-client/gogs.go2
-rw-r--r--vendor/github.com/gogits/go-gogs-client/repo_hook.go24
2 files changed, 25 insertions, 1 deletions
diff --git a/vendor/github.com/gogits/go-gogs-client/gogs.go b/vendor/github.com/gogits/go-gogs-client/gogs.go
index c34d87f5..1d40a25d 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.8"
+ return "0.12.9"
}
// 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 ca142e23..5dbe9c2d 100644
--- a/vendor/github.com/gogits/go-gogs-client/repo_hook.go
+++ b/vendor/github.com/gogits/go-gogs-client/repo_hook.go
@@ -92,7 +92,10 @@ type PayloadCommit struct {
var (
_ Payloader = &CreatePayload{}
_ Payloader = &DeletePayload{}
+ _ Payloader = &ForkPayload{}
_ Payloader = &PushPayload{}
+ _ Payloader = &IssuesPayload{}
+ _ Payloader = &IssueCommentPayload{}
_ Payloader = &PullRequestPayload{}
)
@@ -266,6 +269,27 @@ func (p *IssuesPayload) JSONPayload() ([]byte, error) {
return json.MarshalIndent(p, "", " ")
}
+type HookIssueCommentAction string
+
+const (
+ HOOK_ISSUE_COMMENT_CREATED HookIssueCommentAction = "created"
+ HOOK_ISSUE_COMMENT_EDITED HookIssueCommentAction = "edited"
+ HOOK_ISSUE_COMMENT_DELETED HookIssueCommentAction = "deleted"
+)
+
+type IssueCommentPayload struct {
+ Action HookIssueCommentAction `json:"action"`
+ Issue *Issue `json:"issue"`
+ Comment *Comment `json:"comment"`
+ Changes *ChangesPayload `json:"changes,omitempty"`
+ Repository *Repository `json:"repository"`
+ Sender *User `json:"sender"`
+}
+
+func (p *IssueCommentPayload) JSONPayload() ([]byte, error) {
+ return json.MarshalIndent(p, "", " ")
+}
+
// __________ .__ .__ __________ __
// \______ \__ __| | | | \______ \ ____ ________ __ ____ _______/ |_
// | ___/ | \ | | | | _// __ \/ ____/ | \_/ __ \ / ___/\ __\