0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-22 08:55:41 +01:00

improvement

This commit is contained in:
Lunny Xiao 2026-02-19 12:12:01 -08:00
parent 829b01312c
commit e40b316856
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
2 changed files with 3 additions and 3 deletions

View File

@ -151,9 +151,9 @@ type CreateRepoOption struct {
// TrustModel of the repository
// enum: default,collaborator,committer,collaboratorcommitter
TrustModel string `json:"trust_model" binding:"In(default,collaborator,committer,collaboratorcommitter)"`
// ObjectFormatName of the underlying git repository
// ObjectFormatName of the underlying git repository, empty string for default (sha1)
// enum: sha1,sha256
ObjectFormatName string `json:"object_format_name" binding:"MaxSize(6) In(sha1,sha256)"`
ObjectFormatName string `json:"object_format_name" binding:"MaxSize(6)"`
}
// EditRepoOption options when editing a repository's properties

View File

@ -42,7 +42,7 @@ type CreateRepoForm struct {
ProtectedBranch bool
ForkSingleBranch string `binding:"MaxSize(255)"`
ObjectFormatName string `binding:"MaxSize(6) In(sha1,sha256)"`
ObjectFormatName string `binding:"In(sha1,sha256)"`
}
// Validate validates the fields