chore: fix repo watch (#38921)

This commit is contained in:
wxiaoguang
2026-08-16 03:00:59 +00:00
committed by GitHub
parent 56ad4689ad
commit 5e4d21acd5
26 changed files with 156 additions and 137 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ func DeleteCollaboration(ctx context.Context, repo *repo_model.Repository, colla
return err
}
if err = repo_model.WatchRepo(ctx, collaborator, repo, false); err != nil {
if err = repo_model.WatchRepoAuto(ctx, collaborator, repo, false); err != nil {
return err
}
@@ -118,7 +118,7 @@ func ReconsiderWatches(ctx context.Context, repo *repo_model.Repository, user *u
if has, err := access_model.HasAnyUnitAccess(ctx, user.ID, repo); err != nil || has {
return err
}
if err := repo_model.WatchRepo(ctx, user, repo, false); err != nil {
if err := repo_model.WatchRepoAuto(ctx, user, repo, false); err != nil {
return err
}