code.gitea.io/gitea@v1.21.7/services/notify/null.go (about) 1 // Copyright 2019 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package notify 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/git" 14 "code.gitea.io/gitea/modules/repository" 15 ) 16 17 // NullNotifier implements a blank notifier 18 type NullNotifier struct{} 19 20 var _ Notifier = &NullNotifier{} 21 22 // Run places a place holder function 23 func (*NullNotifier) Run() { 24 } 25 26 // CreateIssueComment places a place holder function 27 func (*NullNotifier) CreateIssueComment(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, 28 issue *issues_model.Issue, comment *issues_model.Comment, mentions []*user_model.User) { 29 } 30 31 // NewIssue places a place holder function 32 func (*NullNotifier) NewIssue(ctx context.Context, issue *issues_model.Issue, mentions []*user_model.User) { 33 } 34 35 // IssueChangeStatus places a place holder function 36 func (*NullNotifier) IssueChangeStatus(ctx context.Context, doer *user_model.User, commitID string, issue *issues_model.Issue, actionComment *issues_model.Comment, isClosed bool) { 37 } 38 39 // DeleteIssue notify when some issue deleted 40 func (*NullNotifier) DeleteIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) { 41 } 42 43 // NewPullRequest places a place holder function 44 func (*NullNotifier) NewPullRequest(ctx context.Context, pr *issues_model.PullRequest, mentions []*user_model.User) { 45 } 46 47 // PullRequestReview places a place holder function 48 func (*NullNotifier) PullRequestReview(ctx context.Context, pr *issues_model.PullRequest, r *issues_model.Review, comment *issues_model.Comment, mentions []*user_model.User) { 49 } 50 51 // PullRequestCodeComment places a place holder function 52 func (*NullNotifier) PullRequestCodeComment(ctx context.Context, pr *issues_model.PullRequest, comment *issues_model.Comment, mentions []*user_model.User) { 53 } 54 55 // MergePullRequest places a place holder function 56 func (*NullNotifier) MergePullRequest(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest) { 57 } 58 59 // AutoMergePullRequest places a place holder function 60 func (*NullNotifier) AutoMergePullRequest(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest) { 61 } 62 63 // PullRequestSynchronized places a place holder function 64 func (*NullNotifier) PullRequestSynchronized(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest) { 65 } 66 67 // PullRequestChangeTargetBranch places a place holder function 68 func (*NullNotifier) PullRequestChangeTargetBranch(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest, oldBranch string) { 69 } 70 71 // PullRequestPushCommits notifies when push commits to pull request's head branch 72 func (*NullNotifier) PullRequestPushCommits(ctx context.Context, doer *user_model.User, pr *issues_model.PullRequest, comment *issues_model.Comment) { 73 } 74 75 // PullReviewDismiss notifies when a review was dismissed by repo admin 76 func (*NullNotifier) PullReviewDismiss(ctx context.Context, doer *user_model.User, review *issues_model.Review, comment *issues_model.Comment) { 77 } 78 79 // UpdateComment places a place holder function 80 func (*NullNotifier) UpdateComment(ctx context.Context, doer *user_model.User, c *issues_model.Comment, oldContent string) { 81 } 82 83 // DeleteComment places a place holder function 84 func (*NullNotifier) DeleteComment(ctx context.Context, doer *user_model.User, c *issues_model.Comment) { 85 } 86 87 // NewWikiPage places a place holder function 88 func (*NullNotifier) NewWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, page, comment string) { 89 } 90 91 // EditWikiPage places a place holder function 92 func (*NullNotifier) EditWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, page, comment string) { 93 } 94 95 // DeleteWikiPage places a place holder function 96 func (*NullNotifier) DeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, page string) { 97 } 98 99 // NewRelease places a place holder function 100 func (*NullNotifier) NewRelease(ctx context.Context, rel *repo_model.Release) { 101 } 102 103 // UpdateRelease places a place holder function 104 func (*NullNotifier) UpdateRelease(ctx context.Context, doer *user_model.User, rel *repo_model.Release) { 105 } 106 107 // DeleteRelease places a place holder function 108 func (*NullNotifier) DeleteRelease(ctx context.Context, doer *user_model.User, rel *repo_model.Release) { 109 } 110 111 // IssueChangeMilestone places a place holder function 112 func (*NullNotifier) IssueChangeMilestone(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldMilestoneID int64) { 113 } 114 115 // IssueChangeContent places a place holder function 116 func (*NullNotifier) IssueChangeContent(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldContent string) { 117 } 118 119 // IssueChangeAssignee places a place holder function 120 func (*NullNotifier) IssueChangeAssignee(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, assignee *user_model.User, removed bool, comment *issues_model.Comment) { 121 } 122 123 // PullRequestReviewRequest places a place holder function 124 func (*NullNotifier) PullRequestReviewRequest(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, reviewer *user_model.User, isRequest bool, comment *issues_model.Comment) { 125 } 126 127 // IssueClearLabels places a place holder function 128 func (*NullNotifier) IssueClearLabels(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) { 129 } 130 131 // IssueChangeTitle places a place holder function 132 func (*NullNotifier) IssueChangeTitle(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldTitle string) { 133 } 134 135 // IssueChangeRef places a place holder function 136 func (*NullNotifier) IssueChangeRef(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldTitle string) { 137 } 138 139 // IssueChangeLabels places a place holder function 140 func (*NullNotifier) IssueChangeLabels(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, 141 addedLabels, removedLabels []*issues_model.Label) { 142 } 143 144 // CreateRepository places a place holder function 145 func (*NullNotifier) CreateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_model.Repository) { 146 } 147 148 // AdoptRepository places a place holder function 149 func (*NullNotifier) AdoptRepository(ctx context.Context, doer, u *user_model.User, repo *repo_model.Repository) { 150 } 151 152 // DeleteRepository places a place holder function 153 func (*NullNotifier) DeleteRepository(ctx context.Context, doer *user_model.User, repo *repo_model.Repository) { 154 } 155 156 // ForkRepository places a place holder function 157 func (*NullNotifier) ForkRepository(ctx context.Context, doer *user_model.User, oldRepo, repo *repo_model.Repository) { 158 } 159 160 // MigrateRepository places a place holder function 161 func (*NullNotifier) MigrateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_model.Repository) { 162 } 163 164 // PushCommits notifies commits pushed to notifiers 165 func (*NullNotifier) PushCommits(ctx context.Context, pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) { 166 } 167 168 // CreateRef notifies branch or tag creation to notifiers 169 func (*NullNotifier) CreateRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refFullName git.RefName, refID string) { 170 } 171 172 // DeleteRef notifies branch or tag deletion to notifiers 173 func (*NullNotifier) DeleteRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refFullName git.RefName) { 174 } 175 176 // RenameRepository places a place holder function 177 func (*NullNotifier) RenameRepository(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldRepoName string) { 178 } 179 180 // TransferRepository places a place holder function 181 func (*NullNotifier) TransferRepository(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldOwnerName string) { 182 } 183 184 // SyncPushCommits places a place holder function 185 func (*NullNotifier) SyncPushCommits(ctx context.Context, pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) { 186 } 187 188 // SyncCreateRef places a place holder function 189 func (*NullNotifier) SyncCreateRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refFullName git.RefName, refID string) { 190 } 191 192 // SyncDeleteRef places a place holder function 193 func (*NullNotifier) SyncDeleteRef(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, refFullName git.RefName) { 194 } 195 196 // RepoPendingTransfer places a place holder function 197 func (*NullNotifier) RepoPendingTransfer(ctx context.Context, doer, newOwner *user_model.User, repo *repo_model.Repository) { 198 } 199 200 // PackageCreate places a place holder function 201 func (*NullNotifier) PackageCreate(ctx context.Context, doer *user_model.User, pd *packages_model.PackageDescriptor) { 202 } 203 204 // PackageDelete places a place holder function 205 func (*NullNotifier) PackageDelete(ctx context.Context, doer *user_model.User, pd *packages_model.PackageDescriptor) { 206 } 207 208 // ChangeDefaultBranch places a place holder function 209 func (*NullNotifier) ChangeDefaultBranch(ctx context.Context, repo *repo_model.Repository) { 210 }