Skip to content

Commit 42ed856

Browse files
committed
Merge branch 'main' into lunny/fix_webhook_glob
2 parents 5244657 + 67b457d commit 42ed856

File tree

326 files changed

+5971
-4810
lines changed

Some content is hidden

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

326 files changed

+5971
-4810
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"ghcr.io/devcontainers/features/git-lfs:1.2.5": {},
1414
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {},
1515
"ghcr.io/devcontainers/features/python:1": {
16-
"version": "3.13"
16+
"version": "3.14"
1717
},
1818
"ghcr.io/warrenbuckley/codespace-features/sqlite:1": {}
1919
},

.github/labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ modifies/internal:
4646
- ".gitpod.yml"
4747
- ".markdownlint.yaml"
4848
- ".spectral.yaml"
49-
- "stylelint.config.ts"
49+
- "stylelint.config.*"
5050
- ".yamllint.yaml"
5151
- ".github/**"
5252
- ".gitea/**"
@@ -89,4 +89,4 @@ topic/code-linting:
8989
- ".markdownlint.yaml"
9090
- ".spectral.yaml"
9191
- ".yamllint.yaml"
92-
- "stylelint.config.ts"
92+
- "stylelint.config.*"

.github/workflows/pull-compliance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
steps:
4040
- uses: actions/checkout@v6
4141
- uses: astral-sh/setup-uv@v7
42-
- run: uv python install 3.12
42+
- run: uv python install 3.14
4343
- uses: pnpm/action-setup@v4
4444
- uses: actions/setup-node@v6
4545
with:
@@ -59,7 +59,7 @@ jobs:
5959
steps:
6060
- uses: actions/checkout@v6
6161
- uses: astral-sh/setup-uv@v7
62-
- run: uv python install 3.12
62+
- run: uv python install 3.14
6363
- run: make deps-py
6464
- run: make lint-yaml
6565

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ linters:
4848
desc: do not use the ini package, use gitea's config system instead
4949
- pkg: gitea.com/go-chi/cache
5050
desc: do not use the go-chi cache package, use gitea's cache system
51+
- pkg: github.com/pkg/errors
52+
desc: use builtin errors package instead
53+
- pkg: github.com/go-ap/errors
54+
desc: use builtin errors package instead
5155
nolintlint:
5256
allow-unused: false
5357
require-explanation: true

CHANGELOG.md

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,39 @@ This changelog goes through the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.com).
66

7-
## [1.25.3](https://github.com/go-gitea/gitea/releases/tag/1.25.3) - 2025-12-17
7+
## [1.25.4](https://github.com/go-gitea/gitea/releases/tag/v1.25.4) - 2026-01-15
8+
9+
* SECURITY
10+
* Release attachments must belong to the intended repo (#36347) (#36375)
11+
* Fix permission check on org project operations (#36318) (#36373)
12+
* Clean watches when make a repository private and check permission when send release emails (#36319) (#36370)
13+
* Add more check for stopwatch read or list (#36340) (#36368)
14+
* Fix openid setting check (#36346) (#36361)
15+
* Fix cancel auto merge bug (#36341) (#36356)
16+
* Fix delete attachment check (#36320) (#36355)
17+
* LFS locks must belong to the intended repo (#36344) (#36349)
18+
* Fix bug on notification read (#36339) #36387
19+
* ENHANCEMENTS
20+
* Add more routes to the "expensive" list (#36290)
21+
* Make "commit statuses" API accept slashes in "ref" (#36264) (#36275)
22+
* BUGFIXES
23+
* Fix git http service handling (#36396)
24+
* Fix markdown newline handling during IME composition (#36421) (#36424)
25+
* Fix missing repository id when migrating release attachments (#36389)
26+
* Fix bug when compare in the pull request (#36363) (#36372)
27+
* Fix incorrect text content detection (#36364) (#36369)
28+
* Fill missing `has_code` in repository api (#36338) (#36359)
29+
* Fix notifications pagination query parameters (#36351) (#36358)
30+
* Fix some trivial problems (#36336) (#36337)
31+
* Prevent panic when GitLab release has more links than sources (#36295) (#36305)
32+
* Fix stats bug when syncing release (#36285) (#36294)
33+
* Always honor user's choice for "delete branch after merge" (#36281) (#36286)
34+
* Use the requested host for LFS links (#36242) (#36258)
35+
* Fix panic when get editor config file (#36241) (#36247)
36+
* Fix regression in writing authorized principals (#36213) (#36218)
37+
* Fix WebAuthn error checking (#36219) (#36235)
38+
39+
## [1.25.3](https://github.com/go-gitea/gitea/releases/tag/v1.25.3) - 2025-12-17
840

941
* SECURITY
1042
* Bump toolchain to go1.25.5, misc fixes (#36082)
@@ -31,7 +63,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
3163
* Fix error handling in mailer and wiki services (#36041) (#36053)
3264
* Fix bugs when comparing and creating pull request (#36166) (#36144)
3365

34-
## [1.25.2](https://github.com/go-gitea/gitea/releases/tag/1.25.2) - 2025-11-23
66+
## [1.25.2](https://github.com/go-gitea/gitea/releases/tag/v1.25.2) - 2025-11-23
3567

3668
* SECURITY
3769
* Upgrade golang.org/x/crypto to 0.45.0 (#35985) (#35988)
@@ -418,7 +450,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
418450
* Hide href attribute of a tag if there is no target_url (#34556) (#34684)
419451
* Fix tag target (#34781) #34783
420452

421-
## [1.24.0](https://github.com/go-gitea/gitea/releases/tag/1.24.0) - 2025-05-26
453+
## [1.24.0](https://github.com/go-gitea/gitea/releases/tag/v1.24.0) - 2025-05-26
422454

423455
* BREAKING
424456
* Make Gitea always use its internal config, ignore `/etc/gitconfig` (#33076)
@@ -788,7 +820,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
788820
* Bump x/net (#32896) (#32900)
789821
* Only activity tab needs heatmap data loading (#34652)
790822

791-
## [1.23.8](https://github.com/go-gitea/gitea/releases/tag/1.23.8) - 2025-05-11
823+
## [1.23.8](https://github.com/go-gitea/gitea/releases/tag/v1.23.8) - 2025-05-11
792824

793825
* SECURITY
794826
* Fix a bug when uploading file via lfs ssh command (#34408) (#34411)
@@ -815,7 +847,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
815847
* Bump go version in go.mod (#34160)
816848
* remove hardcoded 'code' string in clone_panel.tmpl (#34153) (#34158)
817849

818-
## [1.23.7](https://github.com/go-gitea/gitea/releases/tag/1.23.7) - 2025-04-07
850+
## [1.23.7](https://github.com/go-gitea/gitea/releases/tag/v1.23.7) - 2025-04-07
819851

820852
* Enhancements
821853
* Add a config option to block "expensive" pages for anonymous users (#34024) (#34071)
@@ -913,7 +945,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
913945
* BUGFIXES
914946
* Fix a bug caused by status webhook template #33512
915947

916-
## [1.23.2](https://github.com/go-gitea/gitea/releases/tag/1.23.2) - 2025-02-04
948+
## [1.23.2](https://github.com/go-gitea/gitea/releases/tag/v1.23.2) - 2025-02-04
917949

918950
* BREAKING
919951
* Add tests for webhook and fix some webhook bugs (#33396) (#33442)
@@ -3443,7 +3475,7 @@ Key highlights of this release encompass significant changes categorized under `
34433475
* Improve decryption failure message (#24573) (#24575)
34443476
* Makefile: Use portable !, not GNUish -not, with find(1). (#24565) (#24572)
34453477

3446-
## [1.19.3](https://github.com/go-gitea/gitea/releases/tag/1.19.3) - 2023-05-03
3478+
## [1.19.3](https://github.com/go-gitea/gitea/releases/tag/v1.19.3) - 2023-05-03
34473479

34483480
* SECURITY
34493481
* Use golang 1.20.4 to fix CVE-2023-24539, CVE-2023-24540, and CVE-2023-29400
@@ -3456,7 +3488,7 @@ Key highlights of this release encompass significant changes categorized under `
34563488
* Fix incorrect CurrentUser check for docker rootless (#24435)
34573489
* Getting the tag list does not require being signed in (#24413) (#24416)
34583490

3459-
## [1.19.2](https://github.com/go-gitea/gitea/releases/tag/1.19.2) - 2023-04-26
3491+
## [1.19.2](https://github.com/go-gitea/gitea/releases/tag/v1.19.2) - 2023-04-26
34603492

34613493
* SECURITY
34623494
* Require repo scope for PATs for private repos and basic authentication (#24362) (#24364)
@@ -3955,7 +3987,7 @@ Key highlights of this release encompass significant changes categorized under `
39553987
* Display attachments of review comment when comment content is blank (#23035) (#23046)
39563988
* Return empty url for submodule tree entries (#23043) (#23048)
39573989

3958-
## [1.18.4](https://github.com/go-gitea/gitea/releases/tag/1.18.4) - 2023-02-20
3990+
## [1.18.4](https://github.com/go-gitea/gitea/releases/tag/v1.18.4) - 2023-02-20
39593991

39603992
* SECURITY
39613993
* Provide the ability to set password hash algorithm parameters (#22942) (#22943)
@@ -4382,7 +4414,7 @@ Key highlights of this release encompass significant changes categorized under `
43824414
* Fix the mode of custom dir to 0700 in docker-rootless (#20861) (#20867)
43834415
* Fix UI mis-align for PR commit history (#20845) (#20859)
43844416

4385-
## [1.17.1](https://github.com/go-gitea/gitea/releases/tag/1.17.1) - 2022-08-17
4417+
## [1.17.1](https://github.com/go-gitea/gitea/releases/tag/v1.17.1) - 2022-08-17
43864418

43874419
* SECURITY
43884420
* Correctly escape within tribute.js (#20831) (#20832)

Makefile

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ XGO_VERSION := go-1.25.x
3232
AIR_PACKAGE ?= github.com/air-verse/air@v1
3333
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3
3434
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.9.2
35-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.2
35+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.8.0
3636
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.15
3737
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.7.0
3838
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.33.1
3939
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
4040
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1
4141
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1
42-
ACTIONLINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/actionlint@v1.7.9
42+
ACTIONLINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/actionlint@v1.7.10
4343

4444
DOCKER_IMAGE ?= gitea/gitea
4545
DOCKER_TAG ?= latest
@@ -100,7 +100,7 @@ GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
100100

101101
# Enable typescript support in Node.js before 22.18
102102
# TODO: Remove this once we can raise the minimum Node.js version to 22.18 (alpine >= 3.23)
103-
NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v 2>/dev/null | cut -c2- | tr '.' ' '))
103+
NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v 2>/dev/null | cut -c2- | sed 's/-.*//' | tr '.' ' '))
104104
ifeq ($(shell test "$(NODE_VERSION)" -lt "022018000"; echo $$?),0)
105105
NODE_VARS := NODE_OPTIONS="--experimental-strip-types"
106106
else
@@ -211,37 +211,13 @@ help: Makefile ## print Makefile help information.
211211
@printf " \033[36m%-46s\033[0m %s\n" "test[#TestSpecificName]" "run unit test"
212212
@printf " \033[36m%-46s\033[0m %s\n" "test-sqlite[#TestSpecificName]" "run integration test for sqlite"
213213

214-
.PHONY: go-check
215-
go-check:
216-
$(eval MIN_GO_VERSION_STR := $(shell grep -Eo '^go\s+[0-9]+\.[0-9]+' go.mod | cut -d' ' -f2))
217-
$(eval MIN_GO_VERSION := $(shell printf "%03d%03d" $(shell echo '$(MIN_GO_VERSION_STR)' | tr '.' ' ')))
218-
$(eval GO_VERSION := $(shell printf "%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9]+' | tr '.' ' ');))
219-
@if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
220-
echo "Gitea requires Go $(MIN_GO_VERSION_STR) or greater to build. You can get it at https://go.dev/dl/"; \
221-
exit 1; \
222-
fi
223-
224214
.PHONY: git-check
225215
git-check:
226216
@if git lfs >/dev/null 2>&1 ; then : ; else \
227217
echo "Gitea requires git with lfs support to run tests." ; \
228218
exit 1; \
229219
fi
230220

231-
.PHONY: node-check
232-
node-check:
233-
$(eval MIN_NODE_VERSION_STR := $(shell grep -Eo '"node":.*[0-9.]+"' package.json | sed -n 's/.*[^0-9.]\([0-9.]*\)"/\1/p'))
234-
$(eval MIN_NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell echo '$(MIN_NODE_VERSION_STR)' | tr '.' ' ')))
235-
$(eval PNPM_MISSING := $(shell hash pnpm > /dev/null 2>&1 || echo 1))
236-
@if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" ]; then \
237-
echo "Gitea requires Node.js $(MIN_NODE_VERSION_STR) or greater to build. You can get it at https://nodejs.org/en/download/"; \
238-
exit 1; \
239-
fi
240-
@if [ "$(PNPM_MISSING)" = "1" ]; then \
241-
echo "Gitea requires pnpm to build. You can install it at https://pnpm.io/installation"; \
242-
exit 1; \
243-
fi
244-
245221
.PHONY: clean-all
246222
clean-all: clean ## delete backend, frontend and integration files
247223
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules
@@ -341,11 +317,13 @@ lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backen
341317
lint-js: node_modules ## lint js files
342318
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES)
343319
$(NODE_VARS) pnpm exec vue-tsc
320+
$(NODE_VARS) pnpm exec knip --no-progress --cache
344321

345322
.PHONY: lint-js-fix
346323
lint-js-fix: node_modules ## lint js files and fix issues
347324
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES) --fix
348325
$(NODE_VARS) pnpm exec vue-tsc
326+
$(NODE_VARS) pnpm exec knip --no-progress --cache --fix
349327

350328
.PHONY: lint-css
351329
lint-css: node_modules ## lint css files
@@ -426,12 +404,12 @@ watch: ## watch everything and continuously rebuild
426404
@bash tools/watch.sh
427405

428406
.PHONY: watch-frontend
429-
watch-frontend: node-check node_modules ## watch frontend files and continuously rebuild
407+
watch-frontend: node_modules ## watch frontend files and continuously rebuild
430408
@rm -rf $(WEBPACK_DEST_ENTRIES)
431409
NODE_ENV=development $(NODE_VARS) pnpm exec webpack --watch --progress --disable-interpret
432410

433411
.PHONY: watch-backend
434-
watch-backend: go-check ## watch backend files and continuously rebuild
412+
watch-backend: ## watch backend files and continuously rebuild
435413
GITEA_RUN_MODE=dev $(GO) run $(AIR_PACKAGE) -c .air.toml
436414

437415
.PHONY: test
@@ -749,7 +727,7 @@ build: frontend backend ## build everything
749727
frontend: $(WEBPACK_DEST) ## build frontend files
750728

751729
.PHONY: backend
752-
backend: go-check generate-backend $(EXECUTABLE) ## build backend files
730+
backend: generate-backend $(EXECUTABLE) ## build backend files
753731

754732
# We generate the backend before the frontend in case we in future we want to generate things in the frontend from generated files in backend
755733
.PHONY: generate
@@ -860,7 +838,7 @@ node_modules: pnpm-lock.yaml
860838
update: update-js update-py ## update js and py dependencies
861839

862840
.PHONY: update-js
863-
update-js: node-check | node_modules ## update js dependencies
841+
update-js: node_modules ## update js dependencies
864842
$(NODE_VARS) pnpm exec updates -u -f package.json
865843
rm -rf node_modules pnpm-lock.yaml
866844
$(NODE_VARS) pnpm install
@@ -869,7 +847,7 @@ update-js: node-check | node_modules ## update js dependencies
869847
@touch node_modules
870848

871849
.PHONY: update-py
872-
update-py: node-check | node_modules ## update py dependencies
850+
update-py: node_modules ## update py dependencies
873851
$(NODE_VARS) pnpm exec updates -u -f pyproject.toml
874852
rm -rf .venv uv.lock
875853
uv sync
@@ -879,14 +857,14 @@ update-py: node-check | node_modules ## update py dependencies
879857
webpack: $(WEBPACK_DEST) ## build webpack files
880858

881859
$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) pnpm-lock.yaml
882-
@$(MAKE) -s node-check node_modules
860+
@$(MAKE) -s node_modules
883861
@rm -rf $(WEBPACK_DEST_ENTRIES)
884862
@echo "Running webpack..."
885863
@BROWSERSLIST_IGNORE_OLD_DATA=true $(NODE_VARS) pnpm exec webpack --disable-interpret
886864
@touch $(WEBPACK_DEST)
887865

888866
.PHONY: svg
889-
svg: node-check | node_modules ## build svg files
867+
svg: node_modules ## build svg files
890868
rm -rf $(SVG_DEST_DIR)
891869
node tools/generate-svg.ts
892870

README.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
`build` 目标分为两个子目标:
4747

4848
- `make backend` 需要 [Go Stable](https://go.dev/dl/),所需版本在 [go.mod](/go.mod) 中定义。
49-
- `make frontend` 需要 [Node.js LTS](https://nodejs.org/en/download/) 或更高版本
49+
- `make frontend` 需要 [Node.js LTS](https://nodejs.org/en/download/) 或更高版本以及 [pnpm](https://pnpm.io/installation)
5050

5151
需要互联网连接来下载 go 和 npm 模块。从包含预构建前端文件的官方源代码压缩包构建时,不会触发 `frontend` 目标,因此可以在没有 Node.js 的情况下构建。
5252

README.zh-tw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
`build` 目標分為兩個子目標:
4747

4848
- `make backend` 需要 [Go Stable](https://go.dev/dl/),所需版本在 [go.mod](/go.mod) 中定義。
49-
- `make frontend` 需要 [Node.js LTS](https://nodejs.org/en/download/) 或更高版本
49+
- `make frontend` 需要 [Node.js LTS](https://nodejs.org/en/download/) 或更高版本以及 [pnpm](https://pnpm.io/installation)
5050

5151
需要互聯網連接來下載 go 和 npm 模塊。從包含預構建前端文件的官方源代碼壓縮包構建時,不會觸發 `frontend` 目標,因此可以在沒有 Node.js 的情況下構建。
5252

assets/go-licenses.json

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

0 commit comments

Comments
 (0)