Skip to content

Commit 8951291

Browse files
Merge branch 'main' into lunny/issue_dev
2 parents 837526a + 5a85684 commit 8951291

File tree

162 files changed

+2019
-737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+2019
-737
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "Gitea DevContainer",
3-
"image": "mcr.microsoft.com/devcontainers/go:1.22-bullseye",
3+
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
44
"features": {
55
// installs nodejs into container
66
"ghcr.io/devcontainers/features/node:1": {
77
"version": "20"
88
},
9-
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {},
9+
"ghcr.io/devcontainers/features/git-lfs:1.2.2": {},
1010
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
1111
"ghcr.io/devcontainers/features/python:1": {
1212
"version": "3.12"

.github/labeler.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ modifies/go:
7070
- any-glob-to-any-file:
7171
- "**/*.go"
7272

73-
modifies/js:
73+
modifies/frontend:
7474
- changed-files:
7575
- any-glob-to-any-file:
7676
- "**/*.js"
77+
- "**/*.ts"
7778
- "**/*.vue"
7879

7980
docs-update-needed:

.github/workflows/pull-db-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ jobs:
198198
test-mssql:
199199
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
200200
needs: files-changed
201-
runs-on: ubuntu-latest
201+
# specifying the version of ubuntu in use as mssql fails on newer kernels
202+
# pending resolution from vendor
203+
runs-on: ubuntu-20.04
202204
services:
203205
mssql:
204206
image: mcr.microsoft.com/mssql/server:2017-latest

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.22-alpine3.20 AS build-env
2+
FROM docker.io/library/golang:1.23-alpine3.20 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

Dockerfile.rootless

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.22-alpine3.20 AS build-env
2+
FROM docker.io/library/golang:1.23-alpine3.20 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ SHASUM ?= shasum -a 256
2323
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
2424
COMMA := ,
2525

26-
XGO_VERSION := go-1.22.x
26+
XGO_VERSION := go-1.23.x
2727

2828
AIR_PACKAGE ?= github.com/air-verse/air@v1
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/[email protected]
30-
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.6.0
31-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0
30+
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.7.0
31+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3333
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/[email protected]
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]

assets/go-licenses.json

Lines changed: 57 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/admin_user_create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func runCreateUser(c *cli.Context) error {
158158
IsRestricted: restricted,
159159
}
160160

161-
if err := user_model.CreateUser(ctx, u, overwriteDefault); err != nil {
161+
if err := user_model.CreateUser(ctx, u, &user_model.Meta{}, overwriteDefault); err != nil {
162162
return fmt.Errorf("CreateUser: %w", err)
163163
}
164164

cmd/hook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,14 +542,14 @@ Gitea or set your environment appropriately.`, "")
542542

543543
index := bytes.IndexByte(rs.Data, byte(0))
544544
if index >= len(rs.Data) {
545-
return fail(ctx, "Protocol: format error", "pkt-line: format error "+fmt.Sprint(rs.Data))
545+
return fail(ctx, "Protocol: format error", "pkt-line: format error %s", rs.Data)
546546
}
547547

548548
if index < 0 {
549549
if len(rs.Data) == 10 && rs.Data[9] == '\n' {
550550
index = 9
551551
} else {
552-
return fail(ctx, "Protocol: format error", "pkt-line: format error "+fmt.Sprint(rs.Data))
552+
return fail(ctx, "Protocol: format error", "pkt-line: format error %s", rs.Data)
553553
}
554554
}
555555

cmd/serv.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ func runServ(c *cli.Context) error {
143143
return nil
144144
}
145145

146+
defer func() {
147+
if err := recover(); err != nil {
148+
_ = fail(ctx, "Internal Server Error", "Panic: %v\n%s", err, log.Stack(2))
149+
}
150+
}()
151+
146152
keys := strings.Split(c.Args().First(), "-")
147153
if len(keys) != 2 || keys[0] != "key" {
148154
return fail(ctx, "Key ID format error", "Invalid key argument: %s", c.Args().First())
@@ -189,10 +195,7 @@ func runServ(c *cli.Context) error {
189195
}
190196

191197
verb := words[0]
192-
repoPath := words[1]
193-
if repoPath[0] == '/' {
194-
repoPath = repoPath[1:]
195-
}
198+
repoPath := strings.TrimPrefix(words[1], "/")
196199

197200
var lfsVerb string
198201
if verb == lfsAuthenticateVerb {

0 commit comments

Comments
 (0)