9a5720e8ad
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Full namespace migration: update the Go module path and all import statements from git.mokoconsulting.tech to code.mokoconsulting.tech. Also updates all URL references in templates, workflows, configs, tests, and documentation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
58 lines
1.3 KiB
Go
58 lines
1.3 KiB
Go
// Copyright 2025 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package forms
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/optional"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/web/middleware"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/services/context"
|
|
|
|
"gitea.com/go-chi/binding"
|
|
)
|
|
|
|
type CommitCommonForm struct {
|
|
TreePath string `binding:"MaxSize(500)"`
|
|
CommitSummary string `binding:"MaxSize(100)"`
|
|
CommitMessage string
|
|
CommitChoice string `binding:"Required;MaxSize(50)"`
|
|
NewBranchName string `binding:"GitRefName;MaxSize(100)"`
|
|
LastCommit string
|
|
Signoff bool
|
|
CommitEmail string
|
|
}
|
|
|
|
func (f *CommitCommonForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
|
|
ctx := context.GetValidateContext(req)
|
|
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
|
|
}
|
|
|
|
type CommitCommonFormInterface interface {
|
|
GetCommitCommonForm() *CommitCommonForm
|
|
}
|
|
|
|
func (f *CommitCommonForm) GetCommitCommonForm() *CommitCommonForm {
|
|
return f
|
|
}
|
|
|
|
type EditRepoFileForm struct {
|
|
CommitCommonForm
|
|
Content optional.Option[string]
|
|
}
|
|
|
|
type DeleteRepoFileForm struct {
|
|
CommitCommonForm
|
|
}
|
|
|
|
type UploadRepoFileForm struct {
|
|
CommitCommonForm
|
|
Files []string
|
|
}
|
|
|
|
type CherryPickForm struct {
|
|
CommitCommonForm
|
|
Revert bool
|
|
}
|