forked from kevadesu/forgejo
Merge pull request '[FEAT] Trim spaces from repo names on form submission' (#5822) from gusted/forgejo-trim-spaces-form into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5822 Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
commit
0fb48872ac
31 changed files with 54 additions and 36 deletions
|
@ -13,7 +13,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/container"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
"code.forgejo.org/go-chi/binding"
|
||||
)
|
||||
|
||||
// Validate checks whether an IssueTemplate is considered valid, and returns the first error
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/auth"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
"code.forgejo.org/go-chi/binding"
|
||||
"github.com/gobwas/glob"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
"code.forgejo.org/go-chi/binding"
|
||||
chi "github.com/go-chi/chi/v5"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
|
@ -6,7 +6,7 @@ package validation
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
"code.forgejo.org/go-chi/binding"
|
||||
"github.com/gobwas/glob"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ package validation
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
"code.forgejo.org/go-chi/binding"
|
||||
)
|
||||
|
||||
var gitRefNameValidationTestCases = []validationTestCase{
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"regexp"
|
||||
"testing"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
"code.forgejo.org/go-chi/binding"
|
||||
)
|
||||
|
||||
func getRegexPatternErrorString(pattern string) string {
|
||||
|
|
|
@ -6,7 +6,7 @@ package validation
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
"code.forgejo.org/go-chi/binding"
|
||||
)
|
||||
|
||||
var urlValidationTestCases = []validationTestCase{
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/modules/validation"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
"code.forgejo.org/go-chi/binding"
|
||||
)
|
||||
|
||||
// Form form binding interface
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"code.gitea.io/gitea/modules/web/middleware"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
"code.forgejo.org/go-chi/binding"
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue