gitea源码

123456789101112131415161718192021
  1. // Copyright 2025 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package webhook
  4. type HookEvents map[HookEventType]bool
  5. func (he HookEvents) Get(evt HookEventType) bool {
  6. return he[evt]
  7. }
  8. // HookEvent represents events that will delivery hook.
  9. type HookEvent struct {
  10. PushOnly bool `json:"push_only"`
  11. SendEverything bool `json:"send_everything"`
  12. ChooseEvents bool `json:"choose_events"`
  13. BranchFilter string `json:"branch_filter"`
  14. HookEvents `json:"events"`
  15. }