forked from forgejo/forgejo
Simplify parameter types (#18006)
Remove repeated type declarations in function definitions.
This commit is contained in:
parent
25677cdc5b
commit
ff2fd08228
59 changed files with 115 additions and 116 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue