本站源代码
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

44 行
1.8KB

  1. // Copyright 2018 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package base
  5. import (
  6. "code.gitea.io/gitea/models"
  7. "code.gitea.io/gitea/modules/git"
  8. )
  9. // Notifier defines an interface to notify receiver
  10. type Notifier interface {
  11. Run()
  12. NotifyCreateRepository(doer *models.User, u *models.User, repo *models.Repository)
  13. NotifyMigrateRepository(doer *models.User, u *models.User, repo *models.Repository)
  14. NotifyDeleteRepository(doer *models.User, repo *models.Repository)
  15. NotifyForkRepository(doer *models.User, oldRepo, repo *models.Repository)
  16. NotifyNewIssue(*models.Issue)
  17. NotifyIssueChangeStatus(*models.User, *models.Issue, bool)
  18. NotifyIssueChangeMilestone(doer *models.User, issue *models.Issue)
  19. NotifyIssueChangeAssignee(doer *models.User, issue *models.Issue, assignee *models.User, removed bool, comment *models.Comment)
  20. NotifyIssueChangeContent(doer *models.User, issue *models.Issue, oldContent string)
  21. NotifyIssueClearLabels(doer *models.User, issue *models.Issue)
  22. NotifyIssueChangeTitle(doer *models.User, issue *models.Issue, oldTitle string)
  23. NotifyIssueChangeLabels(doer *models.User, issue *models.Issue,
  24. addedLabels []*models.Label, removedLabels []*models.Label)
  25. NotifyNewPullRequest(*models.PullRequest)
  26. NotifyMergePullRequest(*models.PullRequest, *models.User, *git.Repository)
  27. NotifyPullRequestReview(*models.PullRequest, *models.Review, *models.Comment)
  28. NotifyCreateIssueComment(*models.User, *models.Repository,
  29. *models.Issue, *models.Comment)
  30. NotifyUpdateComment(*models.User, *models.Comment, string)
  31. NotifyDeleteComment(*models.User, *models.Comment)
  32. NotifyNewRelease(rel *models.Release)
  33. NotifyUpdateRelease(doer *models.User, rel *models.Release)
  34. NotifyDeleteRelease(doer *models.User, rel *models.Release)
  35. }
上海开阖软件有限公司 沪ICP备12045867号-1