mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-04 01:24:56 +02:00
appease the linter
This commit is contained in:
parent
9f48e36108
commit
79bc3997fe
@ -1,3 +1,5 @@
|
||||
// Copyright 2025 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//go:generate go run main.go ../../
|
||||
|
||||
package main
|
||||
@ -61,7 +63,7 @@ func generatePaths(root string) map[string]any {
|
||||
}
|
||||
|
||||
func writeMapToFile(filename string, data map[string]any) {
|
||||
bytes, err := json.MarshalIndent(data, "", "\t")
|
||||
bytes, err := json.MarshalIndent(data, "", " ")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
// Copyright 2025 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package v1_26
|
||||
|
||||
import "xorm.io/xorm"
|
||||
|
||||
@ -140,14 +140,13 @@ func repoAssignment() func(ctx *context.APIContext) {
|
||||
userName := ctx.PathParam("username")
|
||||
repoName := ctx.PathParam("reponame")
|
||||
var gid int64
|
||||
group := ctx.PathParam("group_id")
|
||||
if group != "" {
|
||||
gid, _ = strconv.ParseInt(group, 10, 64)
|
||||
groupParam := ctx.PathParam("group_id")
|
||||
if groupParam != "" {
|
||||
gid, _ = strconv.ParseInt(groupParam, 10, 64)
|
||||
if gid == 0 {
|
||||
ctx.Redirect(strings.Replace(ctx.Req.URL.RequestURI(), "/0/", "/", 1), 307)
|
||||
return
|
||||
}
|
||||
group += "/"
|
||||
}
|
||||
var (
|
||||
owner *user_model.User
|
||||
|
||||
@ -265,7 +265,6 @@ func GetPullRequestByBaseHead(ctx *context.APIContext) {
|
||||
} else {
|
||||
owner, name = split[0], split[1]
|
||||
}
|
||||
|
||||
} else {
|
||||
owner = split[0]
|
||||
gid = ctx.Repo.Repository.GroupID
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user