main, release/*
",
"incorrect_root_url": "This Forgejo instance is configured to be served on \"%s\". You are currently viewing Forgejo through a different URL, which may cause parts of the application to break. The canonical URL is controlled by Forgejo admins via the ROOT_URL setting in the app.ini.",
"themes.names.forgejo-auto": "Forgejo (follow system theme)",
"themes.names.forgejo-light": "Forgejo light",
diff --git a/routers/api/v1/repo/mirror.go b/routers/api/v1/repo/mirror.go
index bc48c6acb7..f08867dee4 100644
--- a/routers/api/v1/repo/mirror.go
+++ b/routers/api/v1/repo/mirror.go
@@ -389,6 +389,7 @@ func CreatePushMirror(ctx *context.APIContext, mirrorOption *api.CreatePushMirro
Interval: interval,
SyncOnCommit: mirrorOption.SyncOnCommit,
RemoteAddress: remoteAddress,
+ BranchFilter: mirrorOption.BranchFilter,
}
var plainPrivateKey []byte
diff --git a/routers/web/repo/setting/setting.go b/routers/web/repo/setting/setting.go
index 6f35e19880..595fdace83 100644
--- a/routers/web/repo/setting/setting.go
+++ b/routers/web/repo/setting/setting.go
@@ -6,6 +6,7 @@
package setting
import (
+ go_context "context"
"errors"
"fmt"
"net/http"
@@ -589,6 +590,23 @@ func SettingsPost(ctx *context.Context) {
ctx.ServerError("UpdatePushMirrorInterval", err)
return
}
+
+ if m.BranchFilter != form.PushMirrorBranchFilter {
+ // replace `remote.{{ctx.Locale.Tr "repo.mirror_address_desc"}}
+{{ctx.Locale.Tr "repo.settings.push_mirror.branch_filter.description" "https://forgejo.org/docs/latest/user/repo-mirror/#branch-filter" "forgejo"}}
+{{ctx.Locale.Tr "repo.settings.push_mirror.branch_filter.description" "https://forgejo.org/docs/latest/user/repo-mirror/#branch-filter" "forgejo"}}