From 82cb9e0203777a28a792cb29a709f0e62ae1b778 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 24 May 2024 13:28:15 +0200 Subject: ui for adding following repos --- services/repository/repository.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'services/repository') 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) } -- cgit v1.2.3