fix: [CODE-3545] Evict repo cache when deleting importing repositories (#3699)

This commit is contained in:
Atefeh Mohseni Ejiyeh 2025-04-22 00:51:36 +00:00 committed by Harness
parent a4616af1fb
commit bdfe97f77c

View File

@ -29,6 +29,7 @@ import (
"github.com/harness/gitness/types/enum"
"github.com/rs/zerolog/log"
"golang.org/x/exp/slices"
)
type SoftDeleteResponse struct {
@ -107,7 +108,8 @@ func (c *Controller) SoftDeleteNoAuth(
return fmt.Errorf("failed to delete public access for repo: %w", err)
}
if repo.State != enum.RepoStateActive {
if slices.Contains(importingStates, repo.State) {
c.repoFinder.MarkChanged(ctx, repo.Core())
return c.PurgeNoAuth(ctx, session, repo)
}