1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-05 01:57:20 +00:00

Fix some migration and repo name problems (#33986)

1. Ignore empty inputs in `UnmarshalHandleDoubleEncode`
2. Ignore non-existing `stateEvent.User` in gitlab migration
3. Enable `release` and `wiki` units when they are selected in migration
4. Sanitize repo name for migration and new repo
This commit is contained in:
wxiaoguang
2025-03-25 11:26:58 +08:00
committed by GitHub
parent 536f4c6de8
commit 51d86adb6d
12 changed files with 123 additions and 31 deletions

18
modules/json/json_test.go Normal file
View File

@ -0,0 +1,18 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package json
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestGiteaDBJSONUnmarshal(t *testing.T) {
var m map[any]any
err := UnmarshalHandleDoubleEncode(nil, &m)
assert.NoError(t, err)
err = UnmarshalHandleDoubleEncode([]byte(""), &m)
assert.NoError(t, err)
}