diff options
author | Wim <wim@42.be> | 2023-06-05 15:25:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-05 13:25:43 +0000 |
commit | 62ac3251fa545d32bdfc9ff824106b97ec63edbb (patch) | |
tree | 81378a4217e7e3db5fd49889aac969a75507c0fc /modules | |
parent | 8e63373c014ea681309a2e44ecfb0fbfb88a16f7 (diff) | |
download | gitea-62ac3251fa545d32bdfc9ff824106b97ec63edbb.tar.gz gitea-62ac3251fa545d32bdfc9ff824106b97ec63edbb.zip |
Remove stars when repo goes private (#19904)
Fixes #18600
Diffstat (limited to 'modules')
-rw-r--r-- | modules/repository/create.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/repository/create.go b/modules/repository/create.go index e1f0bdcdf9..0558d7f1c0 100644 --- a/modules/repository/create.go +++ b/modules/repository/create.go @@ -397,6 +397,10 @@ func UpdateRepository(ctx context.Context, repo *repo_model.Repository, visibili if err != nil { return err } + + if err = repo_model.ClearRepoStars(ctx, repo.ID); err != nil { + return err + } } // Create/Remove git-daemon-export-ok for git-daemon... |