diff options
author | Gusted <williamzijl7@hotmail.com> | 2021-12-20 05:41:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-20 04:41:31 +0000 |
commit | ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab (patch) | |
tree | 9079b869968d358502f64ce03caf4097556c53cd /modules/notification | |
parent | 25677cdc5b11f7100ca2e4b0819e02ca62e22ab1 (diff) | |
download | gitea-ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab.tar.gz gitea-ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab.zip |
Simplify parameter types (#18006)
Remove repeated type declarations in function definitions.
Diffstat (limited to 'modules/notification')
-rw-r--r-- | modules/notification/action/action.go | 2 | ||||
-rw-r--r-- | modules/notification/base/null.go | 4 | ||||
-rw-r--r-- | modules/notification/indexer/indexer.go | 2 | ||||
-rw-r--r-- | modules/notification/notification.go | 4 | ||||
-rw-r--r-- | modules/notification/webhook/webhook.go | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/modules/notification/action/action.go b/modules/notification/action/action.go index 88395d929a..95b0d6cbef 100644 --- a/modules/notification/action/action.go +++ b/modules/notification/action/action.go @@ -179,7 +179,7 @@ func (a *actionNotifier) NotifyTransferRepository(doer *user_model.User, repo *r } } -func (a *actionNotifier) NotifyCreateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository) { +func (a *actionNotifier) NotifyCreateRepository(doer, u *user_model.User, repo *repo_model.Repository) { if err := models.NotifyWatchers(&models.Action{ ActUserID: doer.ID, ActUser: doer, diff --git a/modules/notification/base/null.go b/modules/notification/base/null.go index 062edf400d..e284c72b12 100644 --- a/modules/notification/base/null.go +++ b/modules/notification/base/null.go @@ -122,7 +122,7 @@ func (*NullNotifier) NotifyIssueChangeLabels(doer *user_model.User, issue *model } // NotifyCreateRepository places a place holder function -func (*NullNotifier) NotifyCreateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository) { +func (*NullNotifier) NotifyCreateRepository(doer, u *user_model.User, repo *repo_model.Repository) { } // NotifyDeleteRepository places a place holder function @@ -134,7 +134,7 @@ func (*NullNotifier) NotifyForkRepository(doer *user_model.User, oldRepo, repo * } // NotifyMigrateRepository places a place holder function -func (*NullNotifier) NotifyMigrateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository) { +func (*NullNotifier) NotifyMigrateRepository(doer, u *user_model.User, repo *repo_model.Repository) { } // NotifyPushCommits notifies commits pushed to notifiers diff --git a/modules/notification/indexer/indexer.go b/modules/notification/indexer/indexer.go index 92fe3c5019..715ec724c3 100644 --- a/modules/notification/indexer/indexer.go +++ b/modules/notification/indexer/indexer.go @@ -115,7 +115,7 @@ func (r *indexerNotifier) NotifyDeleteRepository(doer *user_model.User, repo *re } } -func (r *indexerNotifier) NotifyMigrateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository) { +func (r *indexerNotifier) NotifyMigrateRepository(doer, u *user_model.User, repo *repo_model.Repository) { issue_indexer.UpdateRepoIndexer(repo) if setting.Indexer.RepoIndexerEnabled && !repo.IsEmpty { code_indexer.UpdateRepoIndexer(repo) diff --git a/modules/notification/notification.go b/modules/notification/notification.go index d976dfea66..be8eb1c252 100644 --- a/modules/notification/notification.go +++ b/modules/notification/notification.go @@ -210,14 +210,14 @@ func NotifyIssueChangeLabels(doer *user_model.User, issue *models.Issue, } // NotifyCreateRepository notifies create repository to notifiers -func NotifyCreateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository) { +func NotifyCreateRepository(doer, u *user_model.User, repo *repo_model.Repository) { for _, notifier := range notifiers { notifier.NotifyCreateRepository(doer, u, repo) } } // NotifyMigrateRepository notifies create repository to notifiers -func NotifyMigrateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository) { +func NotifyMigrateRepository(doer, u *user_model.User, repo *repo_model.Repository) { for _, notifier := range notifiers { notifier.NotifyMigrateRepository(doer, u, repo) } diff --git a/modules/notification/webhook/webhook.go b/modules/notification/webhook/webhook.go index 7e96ed0501..16ec31318b 100644 --- a/modules/notification/webhook/webhook.go +++ b/modules/notification/webhook/webhook.go @@ -102,7 +102,7 @@ func (m *webhookNotifier) NotifyForkRepository(doer *user_model.User, oldRepo, r } } -func (m *webhookNotifier) NotifyCreateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository) { +func (m *webhookNotifier) NotifyCreateRepository(doer, u *user_model.User, repo *repo_model.Repository) { // Add to hook queue for created repo after session commit. if err := webhook_services.PrepareWebhooks(repo, webhook.HookEventRepository, &api.RepositoryPayload{ Action: api.HookRepoCreated, @@ -127,7 +127,7 @@ func (m *webhookNotifier) NotifyDeleteRepository(doer *user_model.User, repo *re } } -func (m *webhookNotifier) NotifyMigrateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository) { +func (m *webhookNotifier) NotifyMigrateRepository(doer, u *user_model.User, repo *repo_model.Repository) { // Add to hook queue for created repo after session commit. if err := webhook_services.PrepareWebhooks(repo, webhook.HookEventRepository, &api.RepositoryPayload{ Action: api.HookRepoCreated, |