* 修复runners.go中关于ctx的编译报错 * Merge branch 'main' of gitee.com:devstar/devstar into feature/runner * 实现devstar可以在对应配置的k8s上添加和删除runner * 实现了修改runner的标签的功能 * 单机部署环境下实现Web界面上启动和删除runner * 启动时能够自动启动act_runner
26 lines
596 B
Go
26 lines
596 B
Go
// Copyright 2022 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package forms
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"code.gitea.io/gitea/modules/web/middleware"
|
|
"code.gitea.io/gitea/services/context"
|
|
|
|
"gitea.com/go-chi/binding"
|
|
)
|
|
|
|
// EditRunnerForm form for admin to create runner
|
|
type EditRunnerForm struct {
|
|
Description string
|
|
AgentLabels []string
|
|
}
|
|
|
|
// Validate validates form fields
|
|
func (f *EditRunnerForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
|
|
ctx := context.GetValidateContext(req)
|
|
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
|
|
}
|