Skip to content

Commit 7f3435f

Browse files
authored
Merge branch 'main' into issue-updates
2 parents 4d75e28 + 9bf693d commit 7f3435f

File tree

230 files changed

+3919
-2557
lines changed

Some content is hidden

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

230 files changed

+3919
-2557
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
},
99
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {},
1010
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
11-
"ghcr.io/devcontainers/features/python:1": {}
11+
"ghcr.io/devcontainers/features/python:1": {
12+
"version": "3.12"
13+
}
1214
},
1315
"customizations": {
1416
"vscode": {

.github/workflows/files-changed.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
- "Makefile"
4949
- ".golangci.yml"
5050
- ".editorconfig"
51+
- "options/locale/locale_en-US.ini"
5152
5253
frontend:
5354
- "**/*.js"

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ jobs:
4949
- run: make backend
5050
env:
5151
TAGS: bindata
52-
- run: make test-pgsql-migration test-pgsql
52+
- name: run migration tests
53+
run: make test-pgsql-migration
54+
- name: run tests
55+
run: make test-pgsql
5356
timeout-minutes: 50
5457
env:
5558
TAGS: bindata gogit
@@ -72,7 +75,10 @@ jobs:
7275
- run: make backend
7376
env:
7477
TAGS: bindata gogit sqlite sqlite_unlock_notify
75-
- run: make test-sqlite-migration test-sqlite
78+
- name: run migration tests
79+
run: make test-sqlite-migration
80+
- name: run tests
81+
run: make test-sqlite
7682
timeout-minutes: 50
7783
env:
7884
TAGS: bindata gogit sqlite sqlite_unlock_notify
@@ -175,8 +181,10 @@ jobs:
175181
- run: make backend
176182
env:
177183
TAGS: bindata
184+
- name: run migration tests
185+
run: make test-mysql-migration
178186
- name: run tests
179-
run: make test-mysql-migration integration-test-coverage
187+
run: make integration-test-coverage
180188
env:
181189
TAGS: bindata
182190
RACE_ENABLED: true
@@ -208,7 +216,9 @@ jobs:
208216
- run: make backend
209217
env:
210218
TAGS: bindata
211-
- run: make test-mssql-migration test-mssql
219+
- run: make test-mssql-migration
220+
- name: run tests
221+
run: make test-mssql
212222
timeout-minutes: 50
213223
env:
214224
TAGS: bindata

Makefile

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
115115

116116
GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
117117
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
118+
MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...)
118119

119120
FOMANTIC_WORK_DIR := web_src/fomantic
120121

@@ -147,6 +148,7 @@ GO_DIRS := build cmd models modules routers services tests
147148
WEB_DIRS := web_src/js web_src/css
148149

149150
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github
151+
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.ini
150152

151153
GO_SOURCES := $(wildcard *.go)
152154
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" ! -path modules/options/bindata.go ! -path modules/public/bindata.go ! -path modules/templates/bindata.go)
@@ -426,7 +428,7 @@ lint-go-vet:
426428

427429
.PHONY: lint-editorconfig
428430
lint-editorconfig:
429-
$(GO) run $(EDITORCONFIG_CHECKER_PACKAGE) templates .github/workflows
431+
@$(GO) run $(EDITORCONFIG_CHECKER_PACKAGE) $(EDITORCONFIG_FILES)
430432

431433
.PHONY: lint-actions
432434
lint-actions:
@@ -709,40 +711,31 @@ migrations.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
709711

710712
.PHONY: migrations.individual.mysql.test
711713
migrations.individual.mysql.test: $(GO_SOURCES)
712-
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
713-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
714-
done
714+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
715715

716716
.PHONY: migrations.individual.sqlite.test\#%
717717
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
718718
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
719719

720720
.PHONY: migrations.individual.pgsql.test
721721
migrations.individual.pgsql.test: $(GO_SOURCES)
722-
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
723-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
724-
done
722+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
725723

726724
.PHONY: migrations.individual.pgsql.test\#%
727725
migrations.individual.pgsql.test\#%: $(GO_SOURCES) generate-ini-pgsql
728726
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
729727

730-
731728
.PHONY: migrations.individual.mssql.test
732729
migrations.individual.mssql.test: $(GO_SOURCES) generate-ini-mssql
733-
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
734-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg -test.failfast; \
735-
done
730+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
736731

737732
.PHONY: migrations.individual.mssql.test\#%
738733
migrations.individual.mssql.test\#%: $(GO_SOURCES) generate-ini-mssql
739734
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
740735

741736
.PHONY: migrations.individual.sqlite.test
742737
migrations.individual.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
743-
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
744-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
745-
done
738+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
746739

747740
.PHONY: migrations.individual.sqlite.test\#%
748741
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ Default templates for project boards:
832832
## Issue and pull request attachments (`attachment`)
833833

834834
- `ENABLED`: **true**: Whether issue and pull request attachments are enabled.
835-
- `ALLOWED_TYPES`: **.csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
835+
- `ALLOWED_TYPES`: **.cpuprofile,.csv,.dmp,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.json,.jsonc,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
836836
- `MAX_SIZE`: **2048**: Maximum size (MB).
837837
- `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once.
838838
- `STORAGE_TYPE`: **local**: Storage type for attachments, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]`

docs/content/administration/config-cheat-sheet.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ Gitea 创建以下非唯一队列:
782782
## 工单和合并请求的附件 (`attachment`)
783783

784784
- `ENABLED`: **true**: 是否允许用户上传附件。
785-
- `ALLOWED_TYPES`: **.csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip**: 允许的文件扩展名(`.zip`)、mime 类型(`text/plain`)或通配符类型(`image/*``audio/*``video/*`)的逗号分隔列表。空值或 `*/*` 允许所有类型。
785+
- `ALLOWED_TYPES`: **.cpuprofile,.csv,.dmp,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.json,.jsonc,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip**: 允许的文件扩展名(`.zip`)、mime 类型(`text/plain`)或通配符类型(`image/*``audio/*``video/*`)的逗号分隔列表。空值或 `*/*` 允许所有类型。
786786
- `MAX_SIZE`: **2048**: 附件的最大限制(MB)。
787787
- `MAX_FILES`: **5**: 一次最多上传的附件数量。
788788
- `STORAGE_TYPE`: **local**: 附件的存储类型,`local` 表示本地磁盘,`minio` 表示兼容 S3 的对象存储服务,如果未设置将使用默认值 `local` 或其他在 `[storage.xxx]` 中定义的名称。

docs/content/contributing/guidelines-frontend.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ We recommend [Google HTML/CSS Style Guide](https://google.github.io/styleguide/h
4747
9. Avoid unnecessary `!important` in CSS, add comments to explain why it's necessary if it can't be avoided.
4848
10. Avoid mixing different events in one event listener, prefer to use individual event listeners for every event.
4949
11. Custom event names are recommended to use `ce-` prefix.
50-
12. Gitea's tailwind-style CSS classes use `gt-` prefix (`gt-relative`), while Gitea's own private framework-level CSS classes use `g-` prefix (`g-modal-confirm`).
50+
12. Prefer using Tailwind CSS which is available via `tw-` prefix, e.g. `tw-relative`. Gitea's helper CSS classes use `gt-` prefix (`gt-df`), while Gitea's own private framework-level CSS classes use `g-` prefix (`g-modal-confirm`).
5151
13. Avoid inline scripts & styles as much as possible, it's recommended to put JS code into JS files and use CSS classes. If inline scripts & styles are unavoidable, explain the reason why it can't be avoided.
5252

5353
### Accessibility / ARIA

docs/content/contributing/guidelines-frontend.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ HTML 页面由[Go HTML Template](https://pkg.go.dev/html/template)渲染。
4747
9. 避免在 CSS 中使用不必要的`!important`,如果无法避免,添加注释解释为什么需要它。
4848
10. 避免在一个事件监听器中混合不同的事件,优先为每个事件使用独立的事件监听器。
4949
11. 推荐使用自定义事件名称前缀`ce-`
50-
12. Gitea 的 tailwind-style CSS 类使用`gt-`前缀(`gt-relative`),Gitea 自身的私有框架级 CSS 类使用`g-`前缀(`g-modal-confirm`)。
50+
12. 建议使用 Tailwind CSS,它可以通过 `tw-` 前缀获得,例如 `tw-relative`. Gitea 自身的助手类 CSS 使用 `gt-` 前缀(`gt-df`),Gitea 自身的私有框架级 CSS 类使用 `g-` 前缀(`g-modal-confirm`)。
5151
13. 尽量避免内联脚本和样式,建议将JS代码放入JS文件中并使用CSS类。如果内联脚本和样式不可避免,请解释无法避免的原因。
5252

5353
### 可访问性 / ARIA

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ require (
4949
github.com/go-ldap/ldap/v3 v3.4.6
5050
github.com/go-sql-driver/mysql v1.7.1
5151
github.com/go-swagger/go-swagger v0.30.5
52-
github.com/go-testfixtures/testfixtures/v3 v3.9.0
52+
github.com/go-testfixtures/testfixtures/v3 v3.10.0
5353
github.com/go-webauthn/webauthn v0.10.0
5454
github.com/gobwas/glob v0.2.3
5555
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
5656
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
5757
github.com/golang-jwt/jwt/v5 v5.2.0
5858
github.com/google/go-github/v57 v57.0.0
5959
github.com/google/pprof v0.0.0-20240117000934-35fc243c5815
60-
github.com/google/uuid v1.5.0
60+
github.com/google/uuid v1.6.0
6161
github.com/gorilla/feeds v1.1.2
6262
github.com/gorilla/sessions v1.2.2
6363
github.com/hashicorp/go-version v1.6.0
@@ -73,7 +73,7 @@ require (
7373
github.com/lib/pq v1.10.9
7474
github.com/markbates/goth v1.78.0
7575
github.com/mattn/go-isatty v0.0.20
76-
github.com/mattn/go-sqlite3 v1.14.19
76+
github.com/mattn/go-sqlite3 v1.14.22
7777
github.com/meilisearch/meilisearch-go v0.26.1
7878
github.com/mholt/archiver/v3 v3.5.1
7979
github.com/microcosm-cc/bluemonday v1.0.26
@@ -114,7 +114,7 @@ require (
114114
golang.org/x/text v0.14.0
115115
golang.org/x/tools v0.17.0
116116
google.golang.org/grpc v1.60.1
117-
google.golang.org/protobuf v1.32.0
117+
google.golang.org/protobuf v1.33.0
118118
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
119119
gopkg.in/ini.v1 v1.67.0
120120
gopkg.in/yaml.v3 v3.0.1
@@ -130,7 +130,7 @@ require (
130130
dario.cat/mergo v1.0.0 // indirect
131131
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 // indirect
132132
github.com/ClickHouse/ch-go v0.61.1 // indirect
133-
github.com/ClickHouse/clickhouse-go/v2 v2.17.1 // indirect
133+
github.com/ClickHouse/clickhouse-go/v2 v2.18.0 // indirect
134134
github.com/DataDog/zstd v1.5.5 // indirect
135135
github.com/Masterminds/goutils v1.1.1 // indirect
136136
github.com/Masterminds/semver/v3 v3.2.1 // indirect
@@ -243,7 +243,7 @@ require (
243243
github.com/oklog/ulid v1.3.1 // indirect
244244
github.com/olekukonko/tablewriter v0.0.5 // indirect
245245
github.com/onsi/ginkgo v1.16.5 // indirect
246-
github.com/paulmach/orb v0.11.0 // indirect
246+
github.com/paulmach/orb v0.11.1 // indirect
247247
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
248248
github.com/pierrec/lz4/v4 v4.1.21 // indirect
249249
github.com/pjbgf/sha1cd v0.3.0 // indirect
@@ -304,7 +304,7 @@ replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1
304304

305305
replace github.com/shurcooL/vfsgen => github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0
306306

307-
replace github.com/nektos/act => gitea.com/gitea/act v0.2.51
307+
replace github.com/nektos/act => gitea.com/gitea/act v0.259.1
308308

309309
replace github.com/gorilla/feeds => github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5
310310

0 commit comments

Comments
 (0)