Skip to content

Commit 154f61c

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pubsub
2 parents 372faaa + 8297958 commit 154f61c

File tree

391 files changed

+10834
-12252
lines changed

Some content is hidden

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

391 files changed

+10834
-12252
lines changed

.air.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ bin = "gitea"
77
delay = 1000
88
include_ext = ["go", "tmpl", "css", "js"]
99
include_file = ["main.go"]
10-
include_dir = ["cmd", "models", "modules", "options", "public", "routers", "services", "templates"]
11-
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata", "models/fixtures", "models/migrations/fixtures", "modules/migration/file_format_testdata", "modules/avatar/identicon/testdata"]
10+
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]
11+
exclude_dir = [
12+
"models/fixtures",
13+
"models/migrations/fixtures",
14+
"modules/avatar/identicon/testdata",
15+
"modules/avatar/testdata",
16+
"modules/git/tests",
17+
"modules/migration/file_format_testdata",
18+
"routers/private/tests",
19+
"services/gitdiff/testdata",
20+
]
1221
exclude_regex = ["_test.go$", "_gen.go$"]
1322
stop_on_error = true

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"features": {
55
// installs nodejs into container
66
"ghcr.io/devcontainers/features/node:1": {
7-
"version":"20"
7+
"version": "20"
88
},
99
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {},
1010
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
@@ -24,7 +24,7 @@
2424
"DavidAnson.vscode-markdownlint",
2525
"Vue.volar",
2626
"ms-azuretools.vscode-docker",
27-
"zixuanchen.vitest-explorer",
27+
"vitest.explorer",
2828
"qwtel.sqlite-viewer",
2929
"GitHub.vscode-pull-request-github"
3030
]

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ cpu.out
6262
/data
6363
/indexers
6464
/log
65-
/public/img/avatar
6665
/tests/integration/gitea-integration-*
6766
/tests/integration/indexers-*
6867
/tests/e2e/gitea-e2e-*
@@ -78,6 +77,7 @@ cpu.out
7877
/public/assets/js
7978
/public/assets/css
8079
/public/assets/fonts
80+
/public/assets/img/avatar
8181
/public/assets/img/webpack
8282
/vendor
8383
/web_src/fomantic/node_modules

.eslintrc.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ overrides:
4242
worker: true
4343
rules:
4444
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
45-
- files: ["build/generate-images.js"]
46-
rules:
47-
i/no-unresolved: [0]
48-
i/no-extraneous-dependencies: [0]
4945
- files: ["*.config.*"]
5046
rules:
5147
i/no-unused-modules: [0]
@@ -283,14 +279,14 @@ rules:
283279
i/unambiguous: [0]
284280
init-declarations: [0]
285281
jquery/no-ajax-events: [2]
286-
jquery/no-ajax: [0]
282+
jquery/no-ajax: [2]
287283
jquery/no-animate: [2]
288284
jquery/no-attr: [0]
289285
jquery/no-bind: [2]
290286
jquery/no-class: [0]
291287
jquery/no-clone: [2]
292288
jquery/no-closest: [0]
293-
jquery/no-css: [0]
289+
jquery/no-css: [2]
294290
jquery/no-data: [0]
295291
jquery/no-deferred: [2]
296292
jquery/no-delegate: [2]
@@ -315,7 +311,7 @@ rules:
315311
jquery/no-parent: [0]
316312
jquery/no-parents: [0]
317313
jquery/no-parse-html: [2]
318-
jquery/no-prop: [0]
314+
jquery/no-prop: [2]
319315
jquery/no-proxy: [2]
320316
jquery/no-ready: [2]
321317
jquery/no-serialize: [2]
@@ -396,11 +392,11 @@ rules:
396392
no-irregular-whitespace: [2]
397393
no-iterator: [2]
398394
no-jquery/no-ajax-events: [2]
399-
no-jquery/no-ajax: [0]
395+
no-jquery/no-ajax: [2]
400396
no-jquery/no-and-self: [2]
401397
no-jquery/no-animate-toggle: [2]
402398
no-jquery/no-animate: [2]
403-
no-jquery/no-append-html: [0]
399+
no-jquery/no-append-html: [2]
404400
no-jquery/no-attr: [0]
405401
no-jquery/no-bind: [2]
406402
no-jquery/no-box-model: [2]
@@ -413,7 +409,7 @@ rules:
413409
no-jquery/no-constructor-attributes: [2]
414410
no-jquery/no-contains: [2]
415411
no-jquery/no-context-prop: [2]
416-
no-jquery/no-css: [0]
412+
no-jquery/no-css: [2]
417413
no-jquery/no-data: [0]
418414
no-jquery/no-deferred: [2]
419415
no-jquery/no-delegate: [2]
@@ -466,7 +462,7 @@ rules:
466462
no-jquery/no-parse-html: [2]
467463
no-jquery/no-parse-json: [2]
468464
no-jquery/no-parse-xml: [2]
469-
no-jquery/no-prop: [0]
465+
no-jquery/no-prop: [2]
470466
no-jquery/no-proxy: [2]
471467
no-jquery/no-ready-shorthand: [2]
472468
no-jquery/no-ready: [2]
@@ -487,7 +483,7 @@ rules:
487483
no-jquery/no-visibility: [2]
488484
no-jquery/no-when: [2]
489485
no-jquery/no-wrap: [2]
490-
no-jquery/variable-pattern: [0]
486+
no-jquery/variable-pattern: [2]
491487
no-label-var: [2]
492488
no-labels: [0] # handled by no-restricted-syntax
493489
no-lone-blocks: [2]

.github/labeler.yml

Lines changed: 69 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,84 @@
11
modifies/docs:
2-
- "**/*.md"
3-
- "docs/**"
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- "**/*.md"
5+
- "docs/**"
46

57
modifies/frontend:
6-
- "web_src/**/*"
8+
- changed-files:
9+
- any-glob-to-any-file:
10+
- "web_src/**"
11+
- "tailwind.config.js"
12+
- "webpack.config.js"
713

814
modifies/templates:
9-
- all: ["templates/**", "!templates/swagger/v1_json.tmpl"]
15+
- changed-files:
16+
- all-globs-to-any-file:
17+
- "templates/**"
18+
- "!templates/swagger/v1_json.tmpl"
1019

1120
modifies/api:
12-
- "routers/api/**"
13-
- "templates/swagger/v1_json.tmpl"
21+
- changed-files:
22+
- any-glob-to-any-file:
23+
- "routers/api/**"
24+
- "templates/swagger/v1_json.tmpl"
1425

1526
modifies/cli:
16-
- "cmd/**"
27+
- changed-files:
28+
- any-glob-to-any-file:
29+
- "cmd/**"
1730

1831
modifies/translation:
19-
- "options/locale/*.ini"
32+
- changed-files:
33+
- any-glob-to-any-file:
34+
- "options/locale/*.ini"
2035

2136
modifies/migrations:
22-
- "models/migrations/**/*"
37+
- changed-files:
38+
- any-glob-to-any-file:
39+
- "models/migrations/**"
2340

2441
modifies/internal:
25-
- "Makefile"
26-
- "Dockerfile"
27-
- "Dockerfile.rootless"
28-
- "docker/**"
29-
- "webpack.config.js"
30-
- ".eslintrc.yaml"
31-
- ".golangci.yml"
32-
- ".markdownlint.yaml"
33-
- ".spectral.yaml"
34-
- ".stylelintrc.yaml"
35-
- ".yamllint.yaml"
36-
- ".github/**"
42+
- changed-files:
43+
- any-glob-to-any-file:
44+
- ".air.toml"
45+
- "Makefile"
46+
- "Dockerfile"
47+
- "Dockerfile.rootless"
48+
- ".dockerignore"
49+
- "docker/**"
50+
- ".editorconfig"
51+
- ".eslintrc.yaml"
52+
- ".golangci.yml"
53+
- ".gitpod.yml"
54+
- ".markdownlint.yaml"
55+
- ".spectral.yaml"
56+
- ".stylelintrc.yaml"
57+
- ".yamllint.yaml"
58+
- ".github/**"
59+
- ".gitea/"
60+
- ".devcontainer/**"
61+
- "build.go"
62+
- "build/**"
63+
- "contrib/**"
64+
65+
modifies/dependencies:
66+
- changed-files:
67+
- any-glob-to-any-file:
68+
- "package.json"
69+
- "package-lock.json"
70+
- "pyproject.toml"
71+
- "poetry.lock"
72+
- "go.mod"
73+
- "go.sum"
74+
75+
modifies/go:
76+
- changed-files:
77+
- any-glob-to-any-file:
78+
- "**/*.go"
79+
80+
modifies/js:
81+
- changed-files:
82+
- any-glob-to-any-file:
83+
- "**/*.js"
84+
- "**/*.vue"

.github/workflows/cron-lock.yml

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

.github/workflows/pull-labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12-
label:
12+
labeler:
1313
runs-on: ubuntu-latest
1414
permissions:
1515
contents: read
1616
pull-requests: write
1717
steps:
18-
- uses: actions/labeler@v4
18+
- uses: actions/labeler@v5
1919
with:
20-
dot: true
20+
sync-labels: true

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ cpu.out
5858
/data
5959
/indexers
6060
/log
61-
/public/img/avatar
61+
/public/assets/img/avatar
6262
/tests/integration/gitea-integration-*
6363
/tests/integration/indexers-*
6464
/tests/e2e/gitea-e2e-*

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ vscode:
4242
- DavidAnson.vscode-markdownlint
4343
- Vue.volar
4444
- ms-azuretools.vscode-docker
45-
- zixuanchen.vitest-explorer
45+
- vitest.explorer
4646
- qwtel.sqlite-viewer
4747
- GitHub.vscode-pull-request-github
4848

Makefile

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ GOFUMPT_PACKAGE ?= mvdan.cc/[email protected]
3131
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/[email protected]
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3333
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/[email protected]
34-
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.5
34+
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@db51e79a0e37c572d8b59ae0c58bf2bbbbe53285
3535
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
3636
GO_LICENSES_PACKAGE ?= github.com/google/[email protected]
3737
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/[email protected]
@@ -147,6 +147,8 @@ TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMAN
147147
GO_DIRS := build cmd models modules routers services tests
148148
WEB_DIRS := web_src/js web_src/css
149149

150+
ESLINT_FILES := web_src/js tools *.config.js tests/e2e
151+
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
150152
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github
151153
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.ini
152154

@@ -375,19 +377,19 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
375377

376378
.PHONY: lint-js
377379
lint-js: node_modules
378-
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js tests/e2e
380+
npx eslint --color --max-warnings=0 --ext js,vue $(ESLINT_FILES)
379381

380382
.PHONY: lint-js-fix
381383
lint-js-fix: node_modules
382-
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js tests/e2e --fix
384+
npx eslint --color --max-warnings=0 --ext js,vue $(ESLINT_FILES) --fix
383385

384386
.PHONY: lint-css
385387
lint-css: node_modules
386-
npx stylelint --color --max-warnings=0 web_src/css web_src/js/components/*.vue
388+
npx stylelint --color --max-warnings=0 $(STYLELINT_FILES)
387389

388390
.PHONY: lint-css-fix
389391
lint-css-fix: node_modules
390-
npx stylelint --color --max-warnings=0 web_src/css web_src/js/components/*.vue --fix
392+
npx stylelint --color --max-warnings=0 $(STYLELINT_FILES) --fix
391393

392394
.PHONY: lint-swagger
393395
lint-swagger: node_modules
@@ -444,7 +446,7 @@ lint-yaml: .venv
444446

445447
.PHONY: watch
446448
watch:
447-
@bash build/watch.sh
449+
@bash tools/watch.sh
448450

449451
.PHONY: watch-frontend
450452
watch-frontend: node-check node_modules
@@ -839,10 +841,6 @@ release-sources: | $(DIST_DIRS)
839841
release-docs: | $(DIST_DIRS) docs
840842
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs .
841843

842-
.PHONY: docs
843-
docs:
844-
cd docs; bash scripts/trans-copy.sh;
845-
846844
.PHONY: deps
847845
deps: deps-frontend deps-backend deps-tools deps-py
848846

@@ -920,7 +918,7 @@ $(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json
920918
.PHONY: svg
921919
svg: node-check | node_modules
922920
rm -rf $(SVG_DEST_DIR)
923-
node build/generate-svg.js
921+
node tools/generate-svg.js
924922

925923
.PHONY: svg-check
926924
svg-check: svg
@@ -964,7 +962,7 @@ generate-gitignore:
964962
.PHONY: generate-images
965963
generate-images: | node_modules
966964
npm install --no-save [email protected] imagemin-zopfli@7
967-
node build/generate-images.js $(TAGS)
965+
node tools/generate-images.js $(TAGS)
968966

969967
.PHONY: generate-manpage
970968
generate-manpage:

0 commit comments

Comments
 (0)