gitea源码

123456789101112131415161718192021222324
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. // GitHook represents a Git repository hook
  5. type GitHook struct {
  6. // Name is the name of the Git hook
  7. Name string `json:"name"`
  8. // IsActive indicates if the hook is active
  9. IsActive bool `json:"is_active"`
  10. // Content contains the script content of the hook
  11. Content string `json:"content,omitempty"`
  12. }
  13. // GitHookList represents a list of Git hooks
  14. type GitHookList []*GitHook
  15. // EditGitHookOption options when modifying one Git hook
  16. type EditGitHookOption struct {
  17. // Content is the new script content for the hook
  18. Content string `json:"content"`
  19. }