mirror of
https://github.com/gogs/gogs.git
synced 2025-12-21 07:39:59 +01:00
17
vendor/github.com/gogits/go-gogs-client/repo_hook.go
generated
vendored
17
vendor/github.com/gogits/go-gogs-client/repo_hook.go
generated
vendored
@@ -239,6 +239,8 @@ const (
|
||||
HOOK_ISSUE_UNASSIGNED HookIssueAction = "unassigned"
|
||||
HOOK_ISSUE_LABEL_UPDATED HookIssueAction = "label_updated"
|
||||
HOOK_ISSUE_LABEL_CLEARED HookIssueAction = "label_cleared"
|
||||
HOOK_ISSUE_MILESTONED HookIssueAction = "milestoned"
|
||||
HOOK_ISSUE_DEMILESTONED HookIssueAction = "demilestoned"
|
||||
HOOK_ISSUE_SYNCHRONIZED HookIssueAction = "synchronized"
|
||||
)
|
||||
|
||||
@@ -251,6 +253,19 @@ type ChangesPayload struct {
|
||||
Body *ChangesFromPayload `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
type IssuesPayload struct {
|
||||
Action HookIssueAction `json:"action"`
|
||||
Index int64 `json:"number"`
|
||||
Issue *Issue `json:"issue"`
|
||||
Changes *ChangesPayload `json:"changes,omitempty"`
|
||||
Repository *Repository `json:"repository"`
|
||||
Sender *User `json:"sender"`
|
||||
}
|
||||
|
||||
func (p *IssuesPayload) JSONPayload() ([]byte, error) {
|
||||
return json.MarshalIndent(p, "", " ")
|
||||
}
|
||||
|
||||
// __________ .__ .__ __________ __
|
||||
// \______ \__ __| | | | \______ \ ____ ________ __ ____ _______/ |_
|
||||
// | ___/ | \ | | | | _// __ \/ ____/ | \_/ __ \ / ___/\ __\
|
||||
@@ -262,8 +277,8 @@ type ChangesPayload struct {
|
||||
type PullRequestPayload struct {
|
||||
Action HookIssueAction `json:"action"`
|
||||
Index int64 `json:"number"`
|
||||
Changes *ChangesPayload `json:"changes,omitempty"`
|
||||
PullRequest *PullRequest `json:"pull_request"`
|
||||
Changes *ChangesPayload `json:"changes,omitempty"`
|
||||
Repository *Repository `json:"repository"`
|
||||
Sender *User `json:"sender"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user