0
0
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:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-11-22 18:04:39 -05:00
parent 9f48e36108
commit 79bc3997fe
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C
4 changed files with 9 additions and 6 deletions

View File

@ -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)
}

View File

@ -1,3 +1,6 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package v1_26
import "xorm.io/xorm"

View File

@ -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

View File

@ -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