mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 01:24:39 +02:00
chore: fix repo watch (#38921)
This commit is contained in:
1 parent
56ad4689ad
commit
5e4d21acd5
26 files changed
+156
-137
No files matched your search
@@ -267,13 +267,13 @@ func transferOwnership(ctx context.Context, doer *user_model.User, newOwnerName
|
||||
return fmt.Errorf("decrease old owner repository count: %w", err)
|
||||
}
|
||||
|
||||
if err := repo_model.WatchRepo(ctx, doer, repo, true); err != nil {
|
||||
if err := repo_model.WatchRepoAuto(ctx, doer, repo, true); err != nil {
|
||||
return fmt.Errorf("watchRepo: %w", err)
|
||||
}
|
||||
|
||||
if oldOwner.IsOrganization() {
|
||||
// Remove watch for organization.
|
||||
if err := repo_model.WatchRepo(ctx, oldOwner, repo, false); err != nil {
|
||||
if err := repo_model.WatchRepoAuto(ctx, oldOwner, repo, false); err != nil {
|
||||
return fmt.Errorf("watchRepo [false]: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user