1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-06-27 16:35:57 +00:00

models/repo/pushmirror

This commit is contained in:
Paul Campbell 2025-05-09 07:06:17 +01:00 committed by Paul Campbell
parent 184e068f37
commit ef0788461f

View file

@ -32,6 +32,7 @@ type PushMirror struct {
Repo *Repository `xorm:"-"`
RemoteName string
RemoteAddress string `xorm:"VARCHAR(2048)"`
BranchFilter string `xorm:"VARCHAR(255)"`
// A keypair formatted in OpenSSH format.
PublicKey string `xorm:"VARCHAR(100)"`
@ -122,6 +123,11 @@ func UpdatePushMirrorInterval(ctx context.Context, m *PushMirror) error {
return err
}
func UpdatePushMirrorBranchFilter(ctx context.Context, m *PushMirror) error {
_, err := db.GetEngine(ctx).ID(m.ID).Cols("branch_filter").Update(m)
return err
}
var DeletePushMirrors = deletePushMirrors
func deletePushMirrors(ctx context.Context, opts PushMirrorOptions) error {