summaryrefslogtreecommitdiffstats
path: root/services/repository
diff options
context:
space:
mode:
authorMichael Jerger <michael.jerger@meissa-gmbh.de>2024-05-24 13:28:15 +0200
committerMichael Jerger <michael.jerger@meissa-gmbh.de>2024-05-24 13:28:15 +0200
commit82cb9e0203777a28a792cb29a709f0e62ae1b778 (patch)
treef30f0ba72ede4618fb431b40afc675ef5cbcfc8b /services/repository
parentMerge pull request 'Update dependency @playwright/test to v1.44.1' (#3879) fr... (diff)
downloadforgejo-82cb9e0203777a28a792cb29a709f0e62ae1b778.tar.xz
forgejo-82cb9e0203777a28a792cb29a709f0e62ae1b778.zip
ui for adding following repos
Diffstat (limited to 'services/repository')
-rw-r--r--services/repository/repository.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/repository/repository.go b/services/repository/repository.go
index d28200c0ad..742d93dd2e 100644
--- a/services/repository/repository.go
+++ b/services/repository/repository.go
@@ -1,3 +1,4 @@
+// Copyright 2024 The Forgejo Authors. All rights reserved.
// Copyright 2019 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
@@ -21,6 +22,7 @@ import (
repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/structs"
+ federation_service "code.gitea.io/gitea/services/federation"
notify_service "code.gitea.io/gitea/services/notify"
pull_service "code.gitea.io/gitea/services/pull"
)
@@ -66,6 +68,10 @@ func DeleteRepository(ctx context.Context, doer *user_model.User, repo *repo_mod
return err
}
+ if err := federation_service.DeleteFollowingRepos(ctx, repo.ID); err != nil {
+ return err
+ }
+
return packages_model.UnlinkRepositoryFromAllPackages(ctx, repo.ID)
}