Fix mirror sync parser and fix mirror messages (#36504)

Fix #36474 

It also fixed a bug when sync deleted branches.
This commit is contained in:
Lunny Xiao authored and GitHub committed 2026-02-11 00:16:05 +00:00
1 parent 2d70d37bff
commit 18ccee0f2f
11 files changed
+119 -234

No files matched your search

+2 -2
View File
@@ -177,10 +177,10 @@ func ForkRepository(ctx context.Context, doer, owner *user_model.User, opts Fork
}
defer gitRepo.Close()
if _, err = repo_module.SyncRepoBranchesWithRepo(ctx, repo, gitRepo, doer.ID); err != nil {
if _, _, err = repo_module.SyncRepoBranchesWithRepo(ctx, repo, gitRepo, doer.ID); err != nil {
return nil, fmt.Errorf("SyncRepoBranchesWithRepo: %w", err)
}
if err = repo_module.SyncReleasesWithTags(ctx, repo, gitRepo); err != nil {
if _, err = repo_module.SyncReleasesWithTags(ctx, repo, gitRepo); err != nil {
return nil, fmt.Errorf("Sync releases from git tags failed: %v", err)
}