1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-17 15:58:36 +00:00

When updating mirror repo intervals by API reschedule next update too (#19429) (#19433)

Backport #19429

When a mirror repo interval is updated by the UI it is rescheduled with that interval
however the API does not do this. The API also lacks the enable_prune option.

This PR adds this functionality in to the API Edit Repo endpoint.

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath
2022-04-20 15:04:26 +01:00
committed by GitHub
parent 9c2212df15
commit 08eecba32b
4 changed files with 61 additions and 29 deletions

View File

@@ -183,6 +183,8 @@ type EditRepoOption struct {
Archived *bool `json:"archived,omitempty"`
// set to a string like `8h30m0s` to set the mirror interval time
MirrorInterval *string `json:"mirror_interval,omitempty"`
// enable prune - remove obsolete remote-tracking references
EnablePrune *bool `json:"enable_prune,omitempty"`
}
// GenerateRepoOption options when creating repository using a template