mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-18 17:57:03 +02:00
fix: Remove yaml v3→v4 migration from this PR (moved to dedicated PR)
This commit is contained in:
parent
c5b51f954b
commit
2aa754f287
2
go.mod
2
go.mod
@ -119,6 +119,7 @@ require (
|
||||
google.golang.org/grpc v1.81.1
|
||||
google.golang.org/protobuf v1.36.11
|
||||
gopkg.in/ini.v1 v1.67.2
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
modernc.org/sqlite v1.50.1
|
||||
mvdan.cc/xurls/v2 v2.6.0
|
||||
strk.kbt.io/projects/go/libravatar v0.0.0-20260301104140-add494e31dab
|
||||
@ -287,7 +288,6 @@ require (
|
||||
golang.org/x/tools v0.44.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401020348-3a24fdc17823 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
modernc.org/libc v1.72.3 // indirect
|
||||
modernc.org/mathutil v1.7.1 // indirect
|
||||
modernc.org/memory v1.11.0 // indirect
|
||||
|
||||
@ -16,7 +16,7 @@ import (
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
// CouldBe indicates a file with the filename could be a template,
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
|
||||
"code.gitea.io/gitea/modules/options"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
type labelFile struct {
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/yuin/goldmark/ast"
|
||||
east "github.com/yuin/goldmark/extension/ast"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func nodeToTable(meta *yaml.Node) ast.Node {
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func isYAMLSeparator(line []byte) bool {
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/markup"
|
||||
|
||||
"github.com/yuin/goldmark/ast"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
// RenderConfig represents rendering configuration for this file
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func TestRenderConfig_UnmarshalYAML(t *testing.T) {
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
|
||||
"github.com/santhosh-tekuri/jsonschema/v6"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
// schemaLoader implements jsonschema.URLLoader
|
||||
|
||||
@ -6,7 +6,7 @@ package optional
|
||||
import (
|
||||
"code.gitea.io/gitea/modules/json"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func (o *Option[T]) UnmarshalJSON(data []byte) error {
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/optional"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
type testSerializationStruct struct {
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/validation"
|
||||
|
||||
"github.com/hashicorp/go-version"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/validation"
|
||||
|
||||
"github.com/hashicorp/go-version"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/modules/validation"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
// StateType issue state type
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func TestIssueTemplate_Type(t *testing.T) {
|
||||
@ -95,7 +95,7 @@ labels:
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
err := yaml.Unmarshal([]byte(tt.content), tt.tmpl)
|
||||
if tt.wantErr != "" {
|
||||
assert.ErrorContains(t, err, tt.wantErr)
|
||||
assert.EqualError(t, err, tt.wantErr)
|
||||
} else {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, tt.want, tt.tmpl)
|
||||
|
||||
@ -23,7 +23,7 @@ import (
|
||||
"code.gitea.io/gitea/services/context"
|
||||
packages_service "code.gitea.io/gitea/services/packages"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func apiError(ctx *context.Context, status int, obj any) {
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
"code.gitea.io/gitea/services/context"
|
||||
"code.gitea.io/gitea/services/mailer"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func MailPreviewRender(ctx *context.Context) {
|
||||
|
||||
@ -16,7 +16,7 @@ import (
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
// templateDirCandidates issue templates directory
|
||||
|
||||
@ -26,7 +26,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/structs"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
var _ base.Uploader = &RepositoryDumper{}
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
|
||||
base "code.gitea.io/gitea/modules/migration"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
// RepositoryRestorer implements an Downloader from the local directory
|
||||
|
||||
@ -16,7 +16,7 @@ import (
|
||||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func createIssueConfig(t *testing.T, user *user_model.User, repo *repo_model.Repository, issueConfig map[string]any) {
|
||||
|
||||
@ -20,7 +20,7 @@ import (
|
||||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func TestPackageHelm(t *testing.T) {
|
||||
|
||||
@ -24,7 +24,7 @@ import (
|
||||
"code.gitea.io/gitea/services/migrations"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.yaml.in/yaml/v4"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
func TestDumpRestore(t *testing.T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user