summaryrefslogtreecommitdiffstats
path: root/modules/structs
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-04-20 09:20:53 +0100
committerGitHub <noreply@github.com>2022-04-20 09:20:53 +0100
commit409ff55a293487868cfe034151d84de4cf4b4235 (patch)
tree174d3fca8b0fa33af7b57e7c3e518788cfe77ce0 /modules/structs
parenta56fcdfa8f19efcc53c2163d60c9c1e1bafbc019 (diff)
downloadgitea-409ff55a293487868cfe034151d84de4cf4b4235.tar.gz
gitea-409ff55a293487868cfe034151d84de4cf4b4235.zip
When updating mirror repo intervals by API reschedule next update too (#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>
Diffstat (limited to 'modules/structs')
-rw-r--r--modules/structs/repo.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/structs/repo.go b/modules/structs/repo.go
index c218796620..ef247ebc9c 100644
--- a/modules/structs/repo.go
+++ b/modules/structs/repo.go
@@ -187,6 +187,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