Identify the right place to do continuous sync

This commit is contained in:
harryzcy 2023-05-06 01:24:40 -04:00
parent d83b2efa15
commit 15d16a5607
No known key found for this signature in database
GPG Key ID: E3C2287691E40E35
1 changed files with 3 additions and 1 deletions

View File

@ -308,7 +308,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
log.Error("SyncMirrors [repo: %-v]: failed to update size for mirror repository: %v", m.Repo, err)
}
if m.Repo.HasWiki() {
if m.Repo.HasWiki() && m.SyncWiki {
log.Trace("SyncMirrors [repo: %-v Wiki]: running git remote update...", m.Repo)
stderrBuilder.Reset()
stdoutBuilder.Reset()
@ -372,6 +372,8 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
log.Trace("SyncMirrors [repo: %-v Wiki]: git remote update complete", m.Repo)
}
// TODOsync issues, prs, etc.
log.Trace("SyncMirrors [repo: %-v]: invalidating mirror branch caches...", m.Repo)
branches, _, err := git.GetBranchesByPath(ctx, m.Repo.RepoPath(), 0, 0)
if err != nil {