summaryrefslogtreecommitdiffstats
path: root/modules/structs
diff options
context:
space:
mode:
authorChongyi Zheng <harry@harryzheng.com>2022-12-30 06:22:51 -0500
committerGitHub <noreply@github.com>2022-12-30 19:22:51 +0800
commit9dcaf14a148fdf748c41afc7e0aa2e6b3b273fd8 (patch)
tree9a034ae09943f7a71198e286ffc0cffc27dcd9df /modules/structs
parentb76970f2e45d04d363fd6897439f111db24e4bca (diff)
downloadgitea-9dcaf14a148fdf748c41afc7e0aa2e6b3b273fd8.tar.gz
gitea-9dcaf14a148fdf748c41afc7e0aa2e6b3b273fd8.zip
Add `sync_on_commit` option for push mirrors api (#22271)
Push mirrors `sync_on_commit` option was added to the web interface in v1.18.0. However, it's not added to the API. This PR updates the API endpoint. Fixes #22267 Also, I think this should be backported to 1.18
Diffstat (limited to 'modules/structs')
-rw-r--r--modules/structs/mirror.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/structs/mirror.go b/modules/structs/mirror.go
index 21e7751f76..55cd133a4f 100644
--- a/modules/structs/mirror.go
+++ b/modules/structs/mirror.go
@@ -9,6 +9,7 @@ type CreatePushMirrorOption struct {
RemoteUsername string `json:"remote_username"`
RemotePassword string `json:"remote_password"`
Interval string `json:"interval"`
+ SyncOnCommit bool `json:"sync_on_commit"`
}
// PushMirror represents information of a push mirror
@@ -21,4 +22,5 @@ type PushMirror struct {
LastUpdateUnix string `json:"last_update"`
LastError string `json:"last_error"`
Interval string `json:"interval"`
+ SyncOnCommit bool `json:"sync_on_commit"`
}