You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

structs.go 1.6KB

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