aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gogits/go-gogs-client/repo_hook.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/gogits/go-gogs-client/repo_hook.go')
-rw-r--r--vendor/github.com/gogits/go-gogs-client/repo_hook.go27
1 files changed, 27 insertions, 0 deletions
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 5dbe9c2d..1ea75468 100644
--- a/vendor/github.com/gogits/go-gogs-client/repo_hook.go
+++ b/vendor/github.com/gogits/go-gogs-client/repo_hook.go
@@ -256,6 +256,7 @@ type ChangesPayload struct {
Body *ChangesFromPayload `json:"body,omitempty"`
}
+// IssuesPayload represents a payload information of issues event.
type IssuesPayload struct {
Action HookIssueAction `json:"action"`
Index int64 `json:"number"`
@@ -277,6 +278,7 @@ const (
HOOK_ISSUE_COMMENT_DELETED HookIssueCommentAction = "deleted"
)
+// IssueCommentPayload represents a payload information of issue comment event.
type IssueCommentPayload struct {
Action HookIssueCommentAction `json:"action"`
Issue *Issue `json:"issue"`
@@ -310,3 +312,28 @@ type PullRequestPayload struct {
func (p *PullRequestPayload) JSONPayload() ([]byte, error) {
return json.MarshalIndent(p, "", " ")
}
+
+// __________ .__
+// \______ \ ____ | | ____ _____ ______ ____
+// | _// __ \| | _/ __ \\__ \ / ___// __ \
+// | | \ ___/| |_\ ___/ / __ \_\___ \\ ___/
+// |____|_ /\___ >____/\___ >____ /____ >\___ >
+// \/ \/ \/ \/ \/ \/
+
+type HookReleaseAction string
+
+const (
+ HOOK_RELEASE_PUBLISHED HookReleaseAction = "published"
+)
+
+// ReleasePayload represents a payload information of release event.
+type ReleasePayload struct {
+ Action HookReleaseAction `json:"action"`
+ Release *Release `json:"release"`
+ Repository *Repository `json:"repository"`
+ Sender *User `json:"sender"`
+}
+
+func (p *ReleasePayload) JSONPayload() ([]byte, error) {
+ return json.MarshalIndent(p, "", " ")
+}