Skip to content

Commit 594b946

Browse files
Merge remote-tracking branch 'upstream/main' into rearrange-clone-panel
2 parents 5859943 + 20d7707 commit 594b946

File tree

78 files changed

+936
-152
lines changed

Some content is hidden

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

78 files changed

+936
-152
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"

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: 66 additions & 6 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

custom/conf/app.example.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,9 @@ INTERNAL_TOKEN =
507507
;; stemming from cached/logged plain-text API tokens.
508508
;; In future releases, this will become the default behavior
509509
;DISABLE_QUERY_AUTH_TOKEN = false
510+
;;
511+
;; On user registration, record the IP address and user agent of the user to help identify potential abuse.
512+
;; RECORD_USER_SIGNUP_METADATA = false
510513

511514
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
512515
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -2692,7 +2695,7 @@ LEVEL = Info
26922695
;; It's always recommended to use compression when using local disk as log storage if CPU or memory is not a bottleneck.
26932696
;; And for object storage services like S3, which is billed for requests, it would cause extra 2 times of get requests for each log view.
26942697
;; But it will save storage space and network bandwidth, so it's still recommended to use compression.
2695-
;LOG_COMPRESSION = none
2698+
;LOG_COMPRESSION = zstd
26962699
;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
26972700
;ARTIFACT_RETENTION_DAYS = 90
26982701
;; Timeout to stop the task which have running status, but haven't been updated for a long time

go.mod

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module code.gitea.io/gitea
22

3-
go 1.22
3+
go 1.23
44

55
require (
66
code.gitea.io/actions-proto-go v0.4.0
@@ -14,6 +14,7 @@ require (
1414
gitea.com/go-chi/session v0.0.0-20240316035857-16768d98ec96
1515
gitea.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96
1616
gitea.com/lunny/levelqueue v0.4.2-0.20230414023320-3c0159fe0fe4
17+
github.com/42wim/httpsig v1.2.2
1718
github.com/42wim/sshsig v0.0.0-20211121163825-841cf5bbc121
1819
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0
1920
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
@@ -22,6 +23,9 @@ require (
2223
github.com/PuerkitoBio/goquery v1.9.2
2324
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2
2425
github.com/alecthomas/chroma/v2 v2.14.0
26+
github.com/aws/aws-sdk-go v1.43.21
27+
github.com/aws/aws-sdk-go-v2/credentials v1.17.30
28+
github.com/aws/aws-sdk-go-v2/service/codecommit v1.25.1
2529
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
2630
github.com/blevesearch/bleve/v2 v2.4.2
2731
github.com/buildkite/terminal-to-html/v3 v3.12.1
@@ -45,7 +49,6 @@ require (
4549
github.com/go-chi/cors v1.2.1
4650
github.com/go-co-op/gocron v1.37.0
4751
github.com/go-enry/go-enry/v2 v2.8.8
48-
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
4952
github.com/go-git/go-billy/v5 v5.5.0
5053
github.com/go-git/go-git/v5 v5.12.0
5154
github.com/go-ldap/ldap/v3 v3.4.6
@@ -110,13 +113,13 @@ require (
110113
github.com/yuin/goldmark v1.7.2
111114
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
112115
github.com/yuin/goldmark-meta v1.1.0
113-
golang.org/x/crypto v0.24.0
116+
golang.org/x/crypto v0.26.0
114117
golang.org/x/image v0.18.0
115-
golang.org/x/net v0.26.0
118+
golang.org/x/net v0.28.0
116119
golang.org/x/oauth2 v0.21.0
117-
golang.org/x/sys v0.21.0
118-
golang.org/x/text v0.16.0
119-
golang.org/x/tools v0.22.0
120+
golang.org/x/sys v0.23.0
121+
golang.org/x/text v0.17.0
122+
golang.org/x/tools v0.24.0
120123
google.golang.org/grpc v1.62.1
121124
google.golang.org/protobuf v1.34.2
122125
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
@@ -146,6 +149,10 @@ require (
146149
github.com/andybalholm/cascadia v1.3.2 // indirect
147150
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
148151
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
152+
github.com/aws/aws-sdk-go-v2 v1.30.4 // indirect
153+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 // indirect
154+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16 // indirect
155+
github.com/aws/smithy-go v1.20.4 // indirect
149156
github.com/aymerick/douceur v0.2.0 // indirect
150157
github.com/beorn7/perks v1.0.1 // indirect
151158
github.com/bits-and-blooms/bitset v1.13.0 // indirect
@@ -190,6 +197,7 @@ require (
190197
github.com/go-enry/go-oniguruma v1.2.1 // indirect
191198
github.com/go-faster/city v1.0.1 // indirect
192199
github.com/go-faster/errors v0.7.1 // indirect
200+
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e // indirect
193201
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
194202
github.com/go-openapi/analysis v0.23.0 // indirect
195203
github.com/go-openapi/errors v0.22.0 // indirect
@@ -248,18 +256,20 @@ require (
248256
github.com/modern-go/reflect2 v1.0.2 // indirect
249257
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
250258
github.com/mschoch/smat v0.2.0 // indirect
259+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
251260
github.com/nwaples/rardecode v1.1.3 // indirect
252261
github.com/oklog/ulid v1.3.1 // indirect
253262
github.com/olekukonko/tablewriter v0.0.5 // indirect
254263
github.com/onsi/ginkgo v1.16.5 // indirect
264+
github.com/onsi/gomega v1.33.1 // indirect
255265
github.com/paulmach/orb v0.11.1 // indirect
256-
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
266+
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
257267
github.com/pierrec/lz4/v4 v4.1.21 // indirect
258268
github.com/pjbgf/sha1cd v0.3.0 // indirect
259269
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
260-
github.com/prometheus/client_model v0.6.0 // indirect
261-
github.com/prometheus/common v0.50.0 // indirect
262-
github.com/prometheus/procfs v0.13.0 // indirect
270+
github.com/prometheus/client_model v0.6.1 // indirect
271+
github.com/prometheus/common v0.55.0 // indirect
272+
github.com/prometheus/procfs v0.15.1 // indirect
263273
github.com/rhysd/actionlint v1.7.1 // indirect
264274
github.com/rivo/uniseg v0.4.7 // indirect
265275
github.com/rogpeppe/go-internal v1.12.0 // indirect
@@ -299,8 +309,8 @@ require (
299309
go.uber.org/multierr v1.11.0 // indirect
300310
go.uber.org/zap v1.27.0 // indirect
301311
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect
302-
golang.org/x/mod v0.18.0 // indirect
303-
golang.org/x/sync v0.7.0 // indirect
312+
golang.org/x/mod v0.20.0 // indirect
313+
golang.org/x/sync v0.8.0 // indirect
304314
golang.org/x/time v0.5.0 // indirect
305315
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect
306316
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect

0 commit comments

Comments
 (0)