Skip to content

Commit 23ed160

Browse files
committed
# This is a combination of 23 commits.
# This is the 1st commit message: feat: Add max-parallel implementation inside the Gitea server # This is the commit message go-gitea#2: fix: Remove MatrixID and Capacity functionality # This is the commit message go-gitea#3: Fix incorrect text content detection (go-gitea#36364) Fix go-gitea#36325 # This is the commit message go-gitea#4: clean watches when make a repository private and check permission when send release emails (go-gitea#36319) # This is the commit message go-gitea#5: Fix bug when compare in the pull request (go-gitea#36363) The pull request comparison should not use `direct compare`. # This is the commit message go-gitea#6: Fix permission check on org project operations (go-gitea#36318) # This is the commit message go-gitea#7: Release attachments must belong to the intended repo (go-gitea#36347) # This is the commit message go-gitea#8: Indicate when only optional checks failed (go-gitea#36367) Currently it's not clear that you can merge a PR when only optional checks failed: <img width="922" height="447" alt="Screenshot 2026-01-14 at 4 08 17 pm" src="https://github.com/user-attachments/assets/e11670c7-5ab9-42d7-af09-2d8a8fd532d3" /> This PR changes the text to say "Some optional checks failed" when only optional checks failed: <img width="922" height="443" alt="Screenshot 2026-01-14 at 3 59 08 pm" src="https://github.com/user-attachments/assets/9ea69b13-38d6-4cfc-b4f7-952eff58e546" /> When a required check fails it'll still say "Some checks failed": <img width="928" height="343" alt="Screenshot 2026-01-14 at 3 59 20 pm" src="https://github.com/user-attachments/assets/d3764a95-9737-4482-851e-d3406b1e4d76" /> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> # This is the commit message go-gitea#9: Rename CSS variables and improve colorblind themes (go-gitea#36353) Followup go-gitea#36215, rename the variables for consistency with existing vars and change green to value of `--color-blue` in the relevant color blind themes: <img width="1305" height="303" alt="image" src="https://github.com/user-attachments/assets/3d131ab7-99ab-4b03-93ab-715ce0030b08" /> The blue coloring also matched GitHub: <img width="1313" height="393" alt="image" src="https://github.com/user-attachments/assets/f97e35b2-4ff4-49b0-841f-ffd49a02e03d" /> --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> # This is the commit message go-gitea#10: Migrate to `import.meta.env` and clean up types and eslint (go-gitea#36362) `import.meta.env` is supported in both vitest and webpack [as of recent](webpack/webpack#19996), so replace all previous use of `process.env` with it. Current usage is limited to test files, I've also verified it works in actual frontend code. `webpack/module` is added to typescript types which includes the definition for `import.meta.env`. I've also made the eslint globals more precise. Finally, `__webpack_public_path__` is removed from our type definitions because `webpack/module` also provides it. # This is the commit message go-gitea#11: Add chunked transfer encoding support for LFS uploads (go-gitea#36380) Enable chunked transfer encoding for Git LFS uploads by adding Transfer-Encoding: chunked header to upload action responses. This prevents large file uploads (100+ MB) from being blocked by reverse proxies like Cloudflare that buffer non-chunked requests. Fix go-gitea#22233 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> # This is the commit message go-gitea#12: Fix bug on notification read (go-gitea#36339) When a user has been revoked permission to access a repository, the related notification could still be visited. But the repository's information should not be leaked any more. # This is the commit message go-gitea#13: Add ability to download subpath archive (go-gitea#36371) closes: go-gitea#4478 --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> # This is the commit message go-gitea#14: Update JS and PY deps (go-gitea#36383) - Update JS and PY dependencies - Workaround stylelint/stylelint#8893 by moving the stylint config file to JS - Regenerate SVGs - Bump to python 3.14 in devcontainer and actions - Verified `@github/text-expander-element` - Removed obsolete type stub # This is the commit message go-gitea#15: Fix CODEOWNERS review request attribution using comment metadata (go-gitea#36348) Fixes go-gitea#36333 ## Problem When CODEOWNERS automatically assigns reviewers to a pull request, the timeline incorrectly shows the PR author as the one who requested the review (e.g., "PR_AUTHOR requested review from CODE_OWNER"). This is misleading since the action was triggered automatically by CODEOWNERS rules, not by the PR author. ## Solution Store CODEOWNERS attribution in comment metadata instead of changing the doer user: - Add `SpecialDoerName` field to `CommentMetaData` struct (value: `"CODEOWNERS"` for CODEOWNERS-triggered requests) - Pass `isCodeOwners=true` to `AddReviewRequest` and `AddTeamReviewRequest` functions - Template can check this metadata to show appropriate attribution message --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> # This is the commit message go-gitea#16: Hide delete directory button for mirror or archive repository and disable the menu item if user have no permission (go-gitea#36384) # This is the commit message go-gitea#17: add support for archive-upload rpc (go-gitea#36391) Add support for fetching archives with `git archive --remote <repo-url>` closes: go-gitea#23425 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> # This is the commit message go-gitea#18: fix: typos in comments (go-gitea#36394) # This is the commit message go-gitea#19: Refactor git command stdio pipe (go-gitea#36393) And remove the incorrect `ensureValidGitRepository` # This is the commit message go-gitea#20: Some refactors about GetMergeBase (go-gitea#36186) Maybe fix go-gitea#32018 - Use `gitrepo.GetMergeBase` method instead of other two implementations. - Add `FetchRemoteCommit` so that we don't need to add many `remote` to the git repository to avoid possible git lock conflicts. A lock will start when invoke the function, it will be invoked when cross-repository comparing. The head repository will fetch the base repository's base commit id. In most situations, it should lock the fork repositories so that it should not become a bottleneck. - Improve `GetCompareInfo` to remove unnecessarily adding remote. - Remove unnecessary parameters of `SignMerge`. # This is the commit message go-gitea#21: Refactor git command stderr handling (go-gitea#36402) And clean up legacy fragile & incorrect logic # This is the commit message go-gitea#22: [skip ci] Updated translations via Crowdin # This is the commit message go-gitea#23: Fix missing repository id when migrating release attachments (go-gitea#36389) This PR fixes missed repo_id on the migration of attachments to Gitea. It also provides a doctor check to fix the dirty data on the database. Refactor git command context & pipeline (go-gitea#36406) Less and simpler code, fewer bugs Allow foreachref parse max tokens from 4*64KB to 4MB (go-gitea#36414) Fix go-gitea#36408 --------- Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Update material-icon-theme to v5.31.0 (go-gitea#36427) Update chroma to v2.23.0 (go-gitea#36423) Fix markdown newline handling during IME composition (go-gitea#36421) ### Summary Fix incorrect newline handling in markdown editor when using IME input. ### Details While composing text with an IME, pressing Enter should not trigger markdown indentation logic. This change skips indentation handling during composition by checking `e.isComposing`. This prevents unexpected line breaks and formatting issues for CJK users. [skip ci] Updated translations via Crowdin Fix typos: unknow -> unknown, pktLineTypeUnknow -> pktLineTypeUnknown (go-gitea#36419) Fix issue filter menu layout (go-gitea#36426) Fix go-gitea#36420 Fix spelling (go-gitea#36399) Signed-off-by: Thomas Beutlich <115483027+thbeu@users.noreply.github.com> Refactor git command stdio pipe (go-gitea#36422) Most potential deadlock problems should have been fixed, and new code is unlikely to cause new problems with the new design. Also raise the minimum Git version required to 2.6.0 (released in 2015) Remove `node-check` and `go-check`, support node prerelease versions (go-gitea#36382) 1. Remove those checks for the sake of build performance and because go and node will fail anyways if their versions are incorrect. 3. Support pre-release Node version for determining NODE_VARS. 2. Update to the chinese READMEs to mention `pnpm` which is already present in english README. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> fix: Adjust the unittests fix: Lint issues fix: Adjust the swagger config
1 parent 95ea2df commit 23ed160

File tree

218 files changed

+3532
-3028
lines changed

Some content is hidden

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

218 files changed

+3532
-3028
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

Makefile

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -426,12 +402,12 @@ watch: ## watch everything and continuously rebuild
426402
@bash tools/watch.sh
427403

428404
.PHONY: watch-frontend
429-
watch-frontend: node-check node_modules ## watch frontend files and continuously rebuild
405+
watch-frontend: node_modules ## watch frontend files and continuously rebuild
430406
@rm -rf $(WEBPACK_DEST_ENTRIES)
431407
NODE_ENV=development $(NODE_VARS) pnpm exec webpack --watch --progress --disable-interpret
432408

433409
.PHONY: watch-backend
434-
watch-backend: go-check ## watch backend files and continuously rebuild
410+
watch-backend: ## watch backend files and continuously rebuild
435411
GITEA_RUN_MODE=dev $(GO) run $(AIR_PACKAGE) -c .air.toml
436412

437413
.PHONY: test
@@ -749,7 +725,7 @@ build: frontend backend ## build everything
749725
frontend: $(WEBPACK_DEST) ## build frontend files
750726

751727
.PHONY: backend
752-
backend: go-check generate-backend $(EXECUTABLE) ## build backend files
728+
backend: generate-backend $(EXECUTABLE) ## build backend files
753729

754730
# 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
755731
.PHONY: generate
@@ -860,7 +836,7 @@ node_modules: pnpm-lock.yaml
860836
update: update-js update-py ## update js and py dependencies
861837

862838
.PHONY: update-js
863-
update-js: node-check | node_modules ## update js dependencies
839+
update-js: node_modules ## update js dependencies
864840
$(NODE_VARS) pnpm exec updates -u -f package.json
865841
rm -rf node_modules pnpm-lock.yaml
866842
$(NODE_VARS) pnpm install
@@ -869,7 +845,7 @@ update-js: node-check | node_modules ## update js dependencies
869845
@touch node_modules
870846

871847
.PHONY: update-py
872-
update-py: node-check | node_modules ## update py dependencies
848+
update-py: node_modules ## update py dependencies
873849
$(NODE_VARS) pnpm exec updates -u -f pyproject.toml
874850
rm -rf .venv uv.lock
875851
uv sync
@@ -879,14 +855,14 @@ update-py: node-check | node_modules ## update py dependencies
879855
webpack: $(WEBPACK_DEST) ## build webpack files
880856

881857
$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) pnpm-lock.yaml
882-
@$(MAKE) -s node-check node_modules
858+
@$(MAKE) -s node_modules
883859
@rm -rf $(WEBPACK_DEST_ENTRIES)
884860
@echo "Running webpack..."
885861
@BROWSERSLIST_IGNORE_OLD_DATA=true $(NODE_VARS) pnpm exec webpack --disable-interpret
886862
@touch $(WEBPACK_DEST)
887863

888864
.PHONY: svg
889-
svg: node-check | node_modules ## build svg files
865+
svg: node_modules ## build svg files
890866
rm -rf $(SVG_DEST_DIR)
891867
node tools/generate-svg.ts
892868

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.

cmd/hook.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func runHookPostReceive(ctx context.Context, c *cli.Command) error {
318318
setup(ctx, c.Bool("debug"))
319319

320320
// First of all run update-server-info no matter what
321-
if _, _, err := gitcmd.NewCommand("update-server-info").RunStdString(ctx); err != nil {
321+
if err := gitcmd.NewCommand("update-server-info").RunWithStderr(ctx); err != nil {
322322
return fmt.Errorf("failed to call 'git update-server-info': %w", err)
323323
}
324324

@@ -596,8 +596,8 @@ Gitea or set your environment appropriately.`, "")
596596
hookOptions.RefFullNames = make([]git.RefName, 0, hookBatchSize)
597597

598598
for {
599-
// note: pktLineTypeUnknow means pktLineTypeFlush and pktLineTypeData all allowed
600-
rs, err = readPktLine(ctx, reader, pktLineTypeUnknow)
599+
// note: pktLineTypeUnknown means pktLineTypeFlush and pktLineTypeData all allowed
600+
rs, err = readPktLine(ctx, reader, pktLineTypeUnknown)
601601
if err != nil {
602602
return err
603603
}
@@ -616,7 +616,7 @@ Gitea or set your environment appropriately.`, "")
616616

617617
if hasPushOptions {
618618
for {
619-
rs, err = readPktLine(ctx, reader, pktLineTypeUnknow)
619+
rs, err = readPktLine(ctx, reader, pktLineTypeUnknown)
620620
if err != nil {
621621
return err
622622
}
@@ -713,8 +713,8 @@ Gitea or set your environment appropriately.`, "")
713713
type pktLineType int64
714714

715715
const (
716-
// UnKnow type
717-
pktLineTypeUnknow pktLineType = 0
716+
// Unknown type
717+
pktLineTypeUnknown pktLineType = 0
718718
// flush-pkt "0000"
719719
pktLineTypeFlush pktLineType = iota
720720
// data line

custom/conf/app.example.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,11 +737,8 @@ LEVEL = Info
737737
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
738738
;; Git Operation timeout in seconds
739739
;[git.timeout]
740-
;DEFAULT = 360
741740
;MIGRATE = 600
742741
;MIRROR = 300
743-
;CLONE = 300
744-
;PULL = 300
745742
;GC = 60
746743

747744
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

0 commit comments

Comments
 (0)