code.gitea.io/gitea@v1.19.3/modules/notification/base/null.go (about) 1 // Copyright 2019 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package base 5 6 import ( 7 "context" 8 9 issues_model "code.gitea.io/gitea/models/issues" 10 packages_model "code.gitea.io/gitea/models/packages" 11 repo_model "code.gitea.io/gitea/models/repo" 12 user_model "code.gitea.io/gitea/models/user" 13 "code.gitea.io/gitea/modules/repository" 14 ) 15 16 // NullNotifier implements a blank notifier 17 type NullNotifier struct{} 18 19 var _ Notifier = &NullNotifier{} 20 21 // Run places a place holder function 22 func (*NullNotifier) Run() { 23 } 24 25 // NotifyCreateIssueComment places a place holder function 26 func (*NullNotifier) NotifyCreateIssueComment(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, 27 issue *issues_model.Issue, comment *issues_model.Comment, mentions []*user_model.User) { 28 } 29 30 // NotifyNewIssue places a place holder function 31 func (*NullNotifier) NotifyNewIssue(ctx context.Context, issue *issues_model.Issue, mentions []*user_model.User) { 32 } 33 34 // NotifyIssueChangeStatus places a place holder function 35 func (*NullNotifier) NotifyIssueChangeStatus(ctx context.Context, doer *user_model.User, commitID string, issue *issues_model.Issue, actionComment *issues_model.Comment, isClosed bool) { 36 } 37 38 // NotifyDeleteIssue notify when some issue deleted 39 func (*NullNotifier) NotifyDeleteIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) { 40 } 41 42 // NotifyNewPullRequest places a place holder function 43 func (*NullNotifier) NotifyNewPullRequest(ctx context.Context, pr *issues_model.PullRequest, mentions []*user_model.User) { 44 } 45 46 // NotifyPullRequestReview places a place holder function 47 func (*NullNotifier) NotifyPullRequestReview(ctx context.Context, pr *issues_model.PullRequest, r *issues_model.Review, comment *issues_model.Comment, mentions []*user_model.User) { 48 } 49 50 // NotifyPullRequestCodeComment places a place holder function 51 func (*NullNotifier) NotifyPullRequestCodeComment(ctx context.Context, pr *issues_model.PullRequest, comment *issues_model.Comment, mentions []*user_model.User) { 52 } 53 54 // NotifyMergePullRequest places a place holder function 55 func (*NullNotifier) NotifyMergePullRequest(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest) { 56 } 57 58 // NotifyAutoMergePullRequest places a place holder function 59 func (*NullNotifier) NotifyAutoMergePullRequest(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest) { 60 } 61 62 // NotifyPullRequestSynchronized places a place holder function 63 func (*NullNotifier) NotifyPullRequestSynchronized(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest) { 64 } 65 66 // NotifyPullRequestChangeTargetBranch places a place holder function 67 func (*NullNotifier) NotifyPullRequestChangeTargetBranch(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest, oldBranch string) { 68 } 69 70 // NotifyPullRequestPushCommits notifies when push commits to pull request's head branch 71 func (*NullNotifier) NotifyPullRequestPushCommits(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest, comment *issues_model.Comment) { 72 } 73 74 // NotifyPullReviewDismiss notifies when a review was dismissed by repo admin 75 func (*NullNotifier) NotifyPullReviewDismiss(ctx context.Context, doer *user_model.User, review *issues_model.Review, comment *issues_model.Comment) { 76 } 77 78 // NotifyUpdateComment places a place holder function 79 func (*NullNotifier) NotifyUpdateComment(ctx context.Context, doer *user_model.User, c *issues_model.Comment, oldContent string) { 80 } 81 82 // NotifyDeleteComment places a place holder function 83 func (*NullNotifier) NotifyDeleteComment(ctx context.Context, doer *user_model.User, c *issues_model.Comment) { 84 } 85 86 // NotifyNewWikiPage places a place holder function 87 func (*NullNotifier) NotifyNewWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, page, comment string) { 88 } 89 90 // NotifyEditWikiPage places a place holder function 91 func (*NullNotifier) NotifyEditWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, page, comment string) { 92 } 93 94 // NotifyDeleteWikiPage places a place holder function 95 func (*NullNotifier) NotifyDeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, page string) { 96 } 97 98 // NotifyNewRelease places a place holder function 99 func (*NullNotifier) NotifyNewRelease(ctx context.Context, rel *repo_model.Release) { 100 } 101 102 // NotifyUpdateRelease places a place holder function 103 func (*NullNotifier) NotifyUpdateRelease(ctx context.Context, doer *user_model.User, rel *repo_model.Release) { 104 } 105 106 // NotifyDeleteRelease places a place holder function 107 func (*NullNotifier) NotifyDeleteRelease(ctx context.Context, doer *user_model.User, rel *repo_model.Release) { 108 } 109 110 // NotifyIssueChangeMilestone places a place holder function 111 func (*NullNotifier) NotifyIssueChangeMilestone(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldMilestoneID int64) { 112 } 113 114 // NotifyIssueChangeContent places a place holder function 115 func (*NullNotifier) NotifyIssueChangeContent(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldContent string) { 116 } 117 118 // NotifyIssueChangeAssignee places a place holder function 119 func (*NullNotifier) NotifyIssueChangeAssignee(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, assignee *user_model.User, removed bool, comment *issues_model.Comment) { 120 } 121 122 // NotifyPullReviewRequest places a place holder function 123 func (*NullNotifier) NotifyPullReviewRequest(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, reviewer *user_model.User, isRequest bool, comment *issues_model.Comment) { 124 } 125 126 // NotifyIssueClearLabels places a place holder function 127 func (*NullNotifier) NotifyIssueClearLabels(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) { 128 } 129 130 // NotifyIssueChangeTitle places a place holder function 131 func (*NullNotifier) NotifyIssueChangeTitle(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldTitle string) { 132 } 133 134 // NotifyIssueChangeRef places a place holder function 135 func (*NullNotifier) NotifyIssueChangeRef(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldTitle string) { 136 } 137 138 // NotifyIssueChangeLabels places a place holder function 139 func (*NullNotifier) NotifyIssueChangeLabels(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, 140 addedLabels, removedLabels []*issues_model.Label) { 141 } 142 143 // NotifyCreateRepository places a place holder function 144 func (*NullNotifier) NotifyCreateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_model.Repository) { 145 } 146 147 // NotifyDeleteRepository places a place holder function 148 func (*NullNotifier) NotifyDeleteRepository(ctx context.Context, doer *user_model.User, repo *repo_model.Repository) { 149 } 150 151 // NotifyForkRepository places a place holder function 152 func (*NullNotifier) NotifyForkRepository(ctx context.Context, doer *user_model.User, oldRepo, repo *repo_model.Repository) { 153 } 154 155 // NotifyMigrateRepository places a place holder function 156 func (*NullNotifier) NotifyMigrateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_model.Repository) { 157 } 158 159 // NotifyPushCommits notifies commits pushed to notifiers 160 func (*NullNotifier) NotifyPushCommits(ctx context.Context, pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) { 161 } 162 163 // NotifyCreateRef notifies branch or tag creation to notifiers 164 func (*NullNotifier) NotifyCreateRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refType, refFullName, refID string) { 165 } 166 167 // NotifyDeleteRef notifies branch or tag deletion to notifiers 168 func (*NullNotifier) NotifyDeleteRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refType, refFullName string) { 169 } 170 171 // NotifyRenameRepository places a place holder function 172 func (*NullNotifier) NotifyRenameRepository(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldRepoName string) { 173 } 174 175 // NotifyTransferRepository places a place holder function 176 func (*NullNotifier) NotifyTransferRepository(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldOwnerName string) { 177 } 178 179 // NotifySyncPushCommits places a place holder function 180 func (*NullNotifier) NotifySyncPushCommits(ctx context.Context, pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) { 181 } 182 183 // NotifySyncCreateRef places a place holder function 184 func (*NullNotifier) NotifySyncCreateRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refType, refFullName, refID string) { 185 } 186 187 // NotifySyncDeleteRef places a place holder function 188 func (*NullNotifier) NotifySyncDeleteRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refType, refFullName string) { 189 } 190 191 // NotifyRepoPendingTransfer places a place holder function 192 func (*NullNotifier) NotifyRepoPendingTransfer(ctx context.Context, doer, newOwner *user_model.User, repo *repo_model.Repository) { 193 } 194 195 // NotifyPackageCreate places a place holder function 196 func (*NullNotifier) NotifyPackageCreate(ctx context.Context, doer *user_model.User, pd *packages_model.PackageDescriptor) { 197 } 198 199 // NotifyPackageDelete places a place holder function 200 func (*NullNotifier) NotifyPackageDelete(ctx context.Context, doer *user_model.User, pd *packages_model.PackageDescriptor) { 201 }