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

notifier.go 2.4 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. NotifyRenameRepository(doer *models.User, repo *models.Repository, oldName string)
  17. NotifyNewIssue(*models.Issue)
  18. NotifyIssueChangeStatus(*models.User, *models.Issue, bool)
  19. NotifyIssueChangeMilestone(doer *models.User, issue *models.Issue, oldMilestoneID int64)
  20. NotifyIssueChangeAssignee(doer *models.User, issue *models.Issue, assignee *models.User, removed bool, comment *models.Comment)
  21. NotifyIssueChangeContent(doer *models.User, issue *models.Issue, oldContent string)
  22. NotifyIssueClearLabels(doer *models.User, issue *models.Issue)
  23. NotifyIssueChangeTitle(doer *models.User, issue *models.Issue, oldTitle string)
  24. NotifyIssueChangeLabels(doer *models.User, issue *models.Issue,
  25. addedLabels []*models.Label, removedLabels []*models.Label)
  26. NotifyNewPullRequest(*models.PullRequest)
  27. NotifyMergePullRequest(*models.PullRequest, *models.User, *git.Repository)
  28. NotifyPullRequestSynchronized(doer *models.User, pr *models.PullRequest)
  29. NotifyPullRequestReview(*models.PullRequest, *models.Review, *models.Comment)
  30. NotifyCreateIssueComment(*models.User, *models.Repository,
  31. *models.Issue, *models.Comment)
  32. NotifyUpdateComment(*models.User, *models.Comment, string)
  33. NotifyDeleteComment(*models.User, *models.Comment)
  34. NotifyNewRelease(rel *models.Release)
  35. NotifyUpdateRelease(doer *models.User, rel *models.Release)
  36. NotifyDeleteRelease(doer *models.User, rel *models.Release)
  37. NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits)
  38. NotifyCreateRef(doer *models.User, repo *models.Repository, refType, refFullName string)
  39. NotifyDeleteRef(doer *models.User, repo *models.Repository, refType, refFullName string)
  40. }