mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Trivial fixes (#33304)
1. the error check was added for go-git, it was caused by the empty `.keep` file in the test fixtures. 2. use `PostFormValue` instead of `PostForm.Get` (`Get` needs to parse the form ahead) 3. fix incorrect container text (it should show "Images" in the header but not "OS/Arch") 4. align maven xml 5. fix closed PR color&icon
This commit is contained in:
@@ -850,7 +850,7 @@ func Run(ctx *context_module.Context) {
|
||||
inputs := make(map[string]any)
|
||||
if workflowDispatch := workflow.WorkflowDispatchConfig(); workflowDispatch != nil {
|
||||
for name, config := range workflowDispatch.Inputs {
|
||||
value := ctx.Req.PostForm.Get(name)
|
||||
value := ctx.Req.PostFormValue(name)
|
||||
if config.Type == "boolean" {
|
||||
// https://www.w3.org/TR/html401/interact/forms.html
|
||||
// https://stackoverflow.com/questions/11424037/do-checkbox-inputs-only-post-data-if-theyre-checked
|
||||
|
@@ -109,7 +109,7 @@ func RemoveDependency(ctx *context.Context) {
|
||||
}
|
||||
|
||||
// Dependency Type
|
||||
depTypeStr := ctx.Req.PostForm.Get("dependencyType")
|
||||
depTypeStr := ctx.Req.PostFormValue("dependencyType")
|
||||
|
||||
var depType issues_model.DependencyType
|
||||
|
||||
|
@@ -46,7 +46,7 @@ func IssueWatch(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
watch, err := strconv.ParseBool(ctx.Req.PostForm.Get("watch"))
|
||||
watch, err := strconv.ParseBool(ctx.Req.PostFormValue("watch"))
|
||||
if err != nil {
|
||||
ctx.ServerError("watch is not bool", err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user