Skip to content

Commit aaede8e

Browse files
committed
Merge branch 'main' into mainzjj
* main: (35 commits) Correct swagger annotations for enums, status codes, and notification state (go-gitea#37030) Update Nix flake (go-gitea#37024) Bump go and python versions in nix flake (go-gitea#37031) Make task list checkboxes clickable in the preview tab (go-gitea#37010) Add support for in_progress event in workflow_run webhook (go-gitea#36979) Fix various problems (go-gitea#37029) Update AI Contribution Policy (go-gitea#37022) Migrate from webpack to vite (go-gitea#37002) Upgrade yaml (go-gitea#37015) Fix issue label deletion with Actions tokens (go-gitea#37013) Hide delete branch or tag buttons in mirror or archived repositories. (go-gitea#37006) Update AGENTS.md with additional guidelines (go-gitea#37018) Optimize 'refreshAccesses' to perform update without removing then adding (go-gitea#35702) Fix relative-time RangeError (go-gitea#37021) Restyle Workflow Graph (go-gitea#36912) Update message severity colors, fix navbar double border (go-gitea#37019) Clean up checkbox cursor styles (go-gitea#37016) add missing cron tasks to example ini (go-gitea#37012) Add e2e tests for server push events (go-gitea#36879) Update JS dependencies (go-gitea#37001) ...
2 parents e3053b6 + 2633f96 commit aaede8e

File tree

314 files changed

+6903
-5817
lines changed

Some content is hidden

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

314 files changed

+6903
-5817
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"customizations": {
2121
"vscode": {
2222
"settings": {},
23-
// same extensions as Gitpod, should match /.gitpod.yml
2423
"extensions": [
2524
"editorconfig.editorconfig",
2625
"dbaeumer.vscode-eslint",

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ modifies/internal:
4343
- ".editorconfig"
4444
- ".eslintrc.cjs"
4545
- ".golangci.yml"
46-
- ".gitpod.yml"
4746
- ".markdownlint.yaml"
4847
- ".spectral.yaml"
4948
- "stylelint.config.*"

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ cpu.out
7979
/yarn-error.log
8080
/npm-debug.log*
8181
/.pnpm-store
82+
/public/assets/.vite
8283
/public/assets/js
8384
/public/assets/css
8485
/public/assets/fonts
@@ -87,8 +88,6 @@ cpu.out
8788
/VERSION
8889
/.air
8990

90-
# Files and folders that were previously generated
91-
/public/assets/img/webpack
9291

9392
# Snapcraft
9493
/gitea_a*.txt

.gitpod.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

AGENTS.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# Instructions for agents
2-
31
- Use `make help` to find available development targets
4-
- Before committing `.go` changes, run `make fmt` to format, and run `make lint-go` to lint
5-
- Before committing `.ts` changes, run `make lint-js` to lint
6-
- Before committing `go.mod` changes, run `make tidy`
7-
- Before committing new `.go` files, add the current year into the copyright header
8-
- Before committing any files, remove all trailing whitespace from source code lines
9-
- Never force-push to pull request branches
10-
- Always start issue and pull request comments with an authorship attribution
2+
- Run `make fmt` to format `.go` files, and run `make lint-go` to lint them
3+
- Run `make lint-js` to lint `.ts` files
4+
- Run `make tidy` after any `go.mod` changes
5+
- Add the current year into the copyright header of new `.go` files
6+
- Ensure no trailing whitespace in edited files
7+
- Never force-push, amend, or squash unless asked. Use new commits and normal push for pull request updates
8+
- Preserve existing code comments, do not remove or rewrite comments that are still relevant
9+
- In TypeScript, use `!` (non-null assertion) instead of `?.`/`??` when a value is known to always exist
10+
- Include authorship attribution in issue and pull request comments
11+
- Add `Co-Authored-By` lines to all commits, indicating name and model used

CONTRIBUTING.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,18 @@ For configuring IDEs for Gitea development, see the [contributed IDE configurati
7070

7171
## AI Contribution Policy
7272

73-
Contributions made with the assistance of AI tools are welcome, but contributors must use them responsibly.
73+
Contributions made with the assistance of AI tools are welcome, but contributors must use them responsibly and disclose that use clearly.
7474

75-
1. Include related issues or pull requests in the prompt so that the AI has ideal context.
76-
2. Review AI-generated code closely before submitting a pull request.
77-
3. Manually test the changes and add appropriate automated tests where feasible.
78-
4. Only use AI to assist in contributions that you understand well enough to respond to feedback without relying on AI.
79-
5. Indicate AI-generated content in issue and pull requests descriptions and comments. Specify which model was used.
80-
6. Do not use AI to reply to questions about your issue or pull request. The questions are for you, not an AI model.
75+
1. Review AI-generated code closely before marking a pull request ready for review.
76+
2. Manually test the changes and add appropriate automated tests where feasible.
77+
3. Only use AI to assist in contributions that you understand well enough to explain, defend, and revise yourself during review.
78+
4. Disclose AI-assisted content clearly.
79+
5. Do not use AI to reply to questions about your issue or pull request. The questions are for you, not an AI model.
80+
6. AI may be used to help draft issues and pull requests, but contributors remain responsible for the accuracy, completeness, and intent of what they submit.
8181

82-
Maintainers reserve the right to close pull requests and issues that appear to be low-quality AI-generated content. We welcome new contributors, but cannot sustain the effort of supporting contributors who primarily defer to AI rather than engaging substantively with the review process.
82+
Maintainers reserve the right to close pull requests and issues that do not disclose AI assistance, that appear to be low-quality AI-generated content, or where the contributor cannot explain or defend the proposed changes themselves.
83+
84+
We welcome new contributors, but cannot sustain the effort of supporting contributors who primarily defer to AI rather than engaging substantively with the review process.
8385

8486
## Issues
8587

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
# Build frontend on the native platform to avoid QEMU-related issues with esbuild/webpack
2+
# Build frontend on the native platform to avoid QEMU-related issues with nodejs ecosystem
33
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26-alpine3.23 AS frontend-build
44
RUN apk --no-cache add build-base git nodejs pnpm
55
WORKDIR /src

Dockerfile.rootless

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
# Build frontend on the native platform to avoid QEMU-related issues with esbuild/webpack
2+
# Build frontend on the native platform to avoid QEMU-related issues with nodejs ecosystem
33
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26-alpine3.23 AS frontend-build
44
RUN apk --no-cache add build-base git nodejs pnpm
55
WORKDIR /src

Makefile

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/r
120120
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,$(shell $(GO) list ./... | grep -v /vendor/))
121121
MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...)
122122

123-
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
124-
WEBPACK_CONFIGS := webpack.config.ts tailwind.config.ts
125-
WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css
126-
WEBPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts
123+
FRONTEND_SOURCES := $(shell find web_src/js web_src/css -type f)
124+
FRONTEND_CONFIGS := vite.config.ts tailwind.config.ts
125+
FRONTEND_DEST := public/assets/.vite/manifest.json
126+
FRONTEND_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts public/assets/.vite
127127

128128
BINDATA_DEST_WILDCARD := modules/migration/bindata.* modules/public/bindata.* modules/options/bindata.* modules/templates/bindata.*
129129

@@ -199,7 +199,7 @@ git-check:
199199

200200
.PHONY: clean-all
201201
clean-all: clean ## delete backend, frontend and integration files
202-
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules
202+
rm -rf $(FRONTEND_DEST_ENTRIES) node_modules
203203

204204
.PHONY: clean
205205
clean: ## delete backend and integration files
@@ -380,9 +380,8 @@ watch: ## watch everything and continuously rebuild
380380
@bash tools/watch.sh
381381

382382
.PHONY: watch-frontend
383-
watch-frontend: node_modules ## watch frontend files and continuously rebuild
384-
@rm -rf $(WEBPACK_DEST_ENTRIES)
385-
NODE_ENV=development $(NODE_VARS) pnpm exec webpack --watch --progress --disable-interpret
383+
watch-frontend: node_modules ## start vite dev server for frontend
384+
NODE_ENV=development $(NODE_VARS) pnpm exec vite
386385

387386
.PHONY: watch-backend
388387
watch-backend: ## watch backend files and continuously rebuild
@@ -645,7 +644,7 @@ install: $(wildcard *.go)
645644
build: frontend backend ## build everything
646645

647646
.PHONY: frontend
648-
frontend: $(WEBPACK_DEST) ## build frontend files
647+
frontend: $(FRONTEND_DEST) ## build frontend files
649648

650649
.PHONY: backend
651650
backend: generate-backend $(EXECUTABLE) ## build backend files
@@ -672,7 +671,7 @@ ifneq ($(and $(STATIC),$(findstring pam,$(TAGS))),)
672671
endif
673672
CGO_ENABLED="$(CGO_ENABLED)" CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(EXTLDFLAGS) $(LDFLAGS)' -o $@
674673

675-
$(EXECUTABLE_E2E): $(GO_SOURCES)
674+
$(EXECUTABLE_E2E): $(GO_SOURCES) $(FRONTEND_DEST)
676675
CGO_ENABLED=1 $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TEST_TAGS)' -ldflags '-s -w $(EXTLDFLAGS) $(LDFLAGS)' -o $@
677676

678677
.PHONY: release
@@ -776,15 +775,15 @@ update-py: node_modules ## update py dependencies
776775
uv sync
777776
@touch .venv
778777

779-
.PHONY: webpack
780-
webpack: $(WEBPACK_DEST) ## build webpack files
778+
.PHONY: vite
779+
vite: $(FRONTEND_DEST) ## build vite files
781780

782-
$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) pnpm-lock.yaml
781+
$(FRONTEND_DEST): $(FRONTEND_SOURCES) $(FRONTEND_CONFIGS) pnpm-lock.yaml
783782
@$(MAKE) -s node_modules
784-
@rm -rf $(WEBPACK_DEST_ENTRIES)
785-
@echo "Running webpack..."
786-
@BROWSERSLIST_IGNORE_OLD_DATA=true $(NODE_VARS) pnpm exec webpack --disable-interpret
787-
@touch $(WEBPACK_DEST)
783+
@rm -rf $(FRONTEND_DEST_ENTRIES)
784+
@echo "Running vite build..."
785+
@$(NODE_VARS) pnpm exec vite build
786+
@touch $(FRONTEND_DEST)
788787

789788
.PHONY: svg
790789
svg: node_modules ## build svg files

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
[![](https://www.codetriage.com/go-gitea/gitea/badges/users.svg)](https://www.codetriage.com/go-gitea/gitea "Help Contribute to Open Source")
99
[![](https://opencollective.com/gitea/tiers/backers/badge.svg?label=backers&color=brightgreen)](https://opencollective.com/gitea "Become a backer/sponsor of gitea")
1010
[![](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT "License: MIT")
11-
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/go-gitea/gitea)
1211
[![](https://badges.crowdin.net/gitea/localized.svg)](https://translate.gitea.com "Crowdin")
1312

1413
[繁體中文](./README.zh-tw.md) | [简体中文](./README.zh-cn.md)

0 commit comments

Comments
 (0)