aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/transfer.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-09-06 02:37:47 +0800
committerGitHub <noreply@github.com>2023-09-05 18:37:47 +0000
commit540bf9fa6d0d86297c9d575640798b718767bd9f (patch)
tree4b4a782b71e6f066af6c7807337745dc5ee6899a /services/repository/transfer.go
parent084eacb5d42f1ed2520442a4bbc91bb70c9759e1 (diff)
downloadgitea-540bf9fa6d0d86297c9d575640798b718767bd9f.tar.gz
gitea-540bf9fa6d0d86297c9d575640798b718767bd9f.zip
Move notification interface to services layer (#26915)
Extract from #22266
Diffstat (limited to 'services/repository/transfer.go')
-rw-r--r--services/repository/transfer.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/repository/transfer.go b/services/repository/transfer.go
index b9b26f314c..2edb61816f 100644
--- a/services/repository/transfer.go
+++ b/services/repository/transfer.go
@@ -14,9 +14,9 @@ import (
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/log"
- "code.gitea.io/gitea/modules/notification"
repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/sync"
+ notify_service "code.gitea.io/gitea/services/notify"
)
// repoWorkingPool represents a working pool to order the parallel changes to the same repository
@@ -54,7 +54,7 @@ func TransferOwnership(ctx context.Context, doer, newOwner *user_model.User, rep
}
}
- notification.NotifyTransferRepository(ctx, doer, repo, oldOwner.Name)
+ notify_service.TransferRepository(ctx, doer, repo, oldOwner.Name)
return nil
}
@@ -77,7 +77,7 @@ func ChangeRepositoryName(ctx context.Context, doer *user_model.User, repo *repo
repoWorkingPool.CheckOut(fmt.Sprint(repo.ID))
repo.Name = newRepoName
- notification.NotifyRenameRepository(ctx, doer, repo, oldRepoName)
+ notify_service.RenameRepository(ctx, doer, repo, oldRepoName)
return nil
}
@@ -126,7 +126,7 @@ func StartRepositoryTransfer(ctx context.Context, doer, newOwner *user_model.Use
}
// notify users who are able to accept / reject transfer
- notification.NotifyRepoPendingTransfer(ctx, doer, newOwner, repo)
+ notify_service.RepoPendingTransfer(ctx, doer, newOwner, repo)
return nil
}