feat: vendor gitea 1.16.2

This commit is contained in:
2026-06-02 08:36:01 +00:00
parent 247cd60f69
commit 54798b4615
2145 changed files with 162965 additions and 126447 deletions
@@ -8,7 +8,6 @@
package migration
import (
"io"
"io/fs"
"path"
"sync"
@@ -16,6 +15,8 @@ import (
_ "embed"
"code.gitea.io/gitea/modules/assetfs"
"github.com/santhosh-tekuri/jsonschema/v6"
)
//go:embed bindata.dat
@@ -25,6 +26,11 @@ var BuiltinAssets = sync.OnceValue(func() fs.FS {
return assetfs.NewEmbeddedFS(bindata)
})
func openSchema(filename string) (io.ReadCloser, error) {
return BuiltinAssets().Open(path.Base(filename))
func openSchema(filename string) (any, error) {
f, err := BuiltinAssets().Open(path.Base(filename))
if err != nil {
return nil, err
}
defer f.Close()
return jsonschema.UnmarshalJSON(f)
}