Skip to content

Commit

Permalink
variable mirror interval
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperspencer committed Oct 4, 2023
1 parent e530b8b commit 22ed5b6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gitea/gitea.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ func Backup(r types.Repo, d types.GenRepo, dry bool) bool {

return true
}

if d.MirrorInterval != repo.MirrorInterval {
_, _, err := giteaclient.EditRepo(user.UserName, r.Name, gitea.EditRepoOption{MirrorInterval: &d.MirrorInterval})
if err != nil {
log.Error().
Str("stage", "gitea").
Str("url", d.URL).
Msgf("Couldn't update %s", types.Red(r.Name))
}
return false
}

if repo.Mirror {
log.Info().
Str("stage", "gitea").
Expand Down

0 comments on commit 22ed5b6

Please sign in to comment.