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.

null.go 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // Copyright 2019 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. // NullNotifier implements a blank notifier
  10. type NullNotifier struct {
  11. }
  12. var (
  13. _ Notifier = &NullNotifier{}
  14. )
  15. // Run places a place holder function
  16. func (*NullNotifier) Run() {
  17. }
  18. // NotifyCreateIssueComment places a place holder function
  19. func (*NullNotifier) NotifyCreateIssueComment(doer *models.User, repo *models.Repository,
  20. issue *models.Issue, comment *models.Comment) {
  21. }
  22. // NotifyNewIssue places a place holder function
  23. func (*NullNotifier) NotifyNewIssue(issue *models.Issue) {
  24. }
  25. // NotifyIssueChangeStatus places a place holder function
  26. func (*NullNotifier) NotifyIssueChangeStatus(doer *models.User, issue *models.Issue, isClosed bool) {
  27. }
  28. // NotifyNewPullRequest places a place holder function
  29. func (*NullNotifier) NotifyNewPullRequest(pr *models.PullRequest) {
  30. }
  31. // NotifyPullRequestReview places a place holder function
  32. func (*NullNotifier) NotifyPullRequestReview(pr *models.PullRequest, r *models.Review, comment *models.Comment) {
  33. }
  34. // NotifyMergePullRequest places a place holder function
  35. func (*NullNotifier) NotifyMergePullRequest(pr *models.PullRequest, doer *models.User, baseRepo *git.Repository) {
  36. }
  37. // NotifyPullRequestSynchronized places a place holder function
  38. func (*NullNotifier) NotifyPullRequestSynchronized(doer *models.User, pr *models.PullRequest) {
  39. }
  40. // NotifyUpdateComment places a place holder function
  41. func (*NullNotifier) NotifyUpdateComment(doer *models.User, c *models.Comment, oldContent string) {
  42. }
  43. // NotifyDeleteComment places a place holder function
  44. func (*NullNotifier) NotifyDeleteComment(doer *models.User, c *models.Comment) {
  45. }
  46. // NotifyDeleteRepository places a place holder function
  47. func (*NullNotifier) NotifyDeleteRepository(doer *models.User, repo *models.Repository) {
  48. }
  49. // NotifyForkRepository places a place holder function
  50. func (*NullNotifier) NotifyForkRepository(doer *models.User, oldRepo, repo *models.Repository) {
  51. }
  52. // NotifyNewRelease places a place holder function
  53. func (*NullNotifier) NotifyNewRelease(rel *models.Release) {
  54. }
  55. // NotifyUpdateRelease places a place holder function
  56. func (*NullNotifier) NotifyUpdateRelease(doer *models.User, rel *models.Release) {
  57. }
  58. // NotifyDeleteRelease places a place holder function
  59. func (*NullNotifier) NotifyDeleteRelease(doer *models.User, rel *models.Release) {
  60. }
  61. // NotifyIssueChangeMilestone places a place holder function
  62. func (*NullNotifier) NotifyIssueChangeMilestone(doer *models.User, issue *models.Issue, oldMilestoneID int64) {
  63. }
  64. // NotifyIssueChangeContent places a place holder function
  65. func (*NullNotifier) NotifyIssueChangeContent(doer *models.User, issue *models.Issue, oldContent string) {
  66. }
  67. // NotifyIssueChangeAssignee places a place holder function
  68. func (*NullNotifier) NotifyIssueChangeAssignee(doer *models.User, issue *models.Issue, assignee *models.User, removed bool, comment *models.Comment) {
  69. }
  70. // NotifyIssueClearLabels places a place holder function
  71. func (*NullNotifier) NotifyIssueClearLabels(doer *models.User, issue *models.Issue) {
  72. }
  73. // NotifyIssueChangeTitle places a place holder function
  74. func (*NullNotifier) NotifyIssueChangeTitle(doer *models.User, issue *models.Issue, oldTitle string) {
  75. }
  76. // NotifyIssueChangeLabels places a place holder function
  77. func (*NullNotifier) NotifyIssueChangeLabels(doer *models.User, issue *models.Issue,
  78. addedLabels []*models.Label, removedLabels []*models.Label) {
  79. }
  80. // NotifyCreateRepository places a place holder function
  81. func (*NullNotifier) NotifyCreateRepository(doer *models.User, u *models.User, repo *models.Repository) {
  82. }
  83. // NotifyMigrateRepository places a place holder function
  84. func (*NullNotifier) NotifyMigrateRepository(doer *models.User, u *models.User, repo *models.Repository) {
  85. }
  86. // NotifyPushCommits notifies commits pushed to notifiers
  87. func (*NullNotifier) NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) {
  88. }
  89. // NotifyCreateRef notifies branch or tag creation to notifiers
  90. func (*NullNotifier) NotifyCreateRef(doer *models.User, repo *models.Repository, refType, refFullName string) {
  91. }
  92. // NotifyDeleteRef notifies branch or tag deleteion to notifiers
  93. func (*NullNotifier) NotifyDeleteRef(doer *models.User, repo *models.Repository, refType, refFullName string) {
  94. }