1// Copyright 2022 The Gitea Authors. All rights reserved.
2// SPDX-License-Identifier: MIT
3
4package webhook
5
6// HookEvents is a set of web hook events
7type HookEvents struct {
8 Create bool `json:"create"`
9 Delete bool `json:"delete"`
10 Fork bool `json:"fork"`
11 Issues bool `json:"issues"`
12 IssueAssign bool `json:"issue_assign"`
13 IssueLabel bool `json:"issue_label"`
14 IssueMilestone bool `json:"issue_milestone"`
15 IssueComment bool `json:"issue_comment"`
16 Push bool `json:"push"`
17 PullRequest bool `json:"pull_request"`
18 PullRequestAssign bool `json:"pull_request_assign"`
19 PullRequestLabel bool `json:"pull_request_label"`
20 PullRequestMilestone bool `json:"pull_request_milestone"`
21 PullRequestComment bool `json:"pull_request_comment"`
22 PullRequestReview bool `json:"pull_request_review"`
23 PullRequestSync bool `json:"pull_request_sync"`
24 PullRequestReviewRequest bool `json:"pull_request_review_request"`
25 Wiki bool `json:"wiki"`
26 Repository bool `json:"repository"`
27 Release bool `json:"release"`
28 Package bool `json:"package"`
29}
30
31// HookEvent represents events that will delivery hook.
32type HookEvent struct {
33 PushOnly bool `json:"push_only"`
34 SendEverything bool `json:"send_everything"`
35 ChooseEvents bool `json:"choose_events"`
36 BranchFilter string `json:"branch_filter"`
37
38 HookEvents `json:"events"`
39}