Skip to content

Commit 6ec27c4

Browse files
committed
Merge branch 'main' into lunny/commit_status_webhook
2 parents eb216d6 + f4f4e18 commit 6ec27c4

File tree

1,239 files changed

+40464
-43864
lines changed

Some content is hidden

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

1,239 files changed

+40464
-43864
lines changed

.air.toml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@ root = "."
22
tmp_dir = ".air"
33

44
[build]
5+
pre_cmd = ["killall -9 gitea 2>/dev/null || true"] # kill off potential zombie processes from previous runs
56
cmd = "make --no-print-directory backend"
67
bin = "gitea"
7-
delay = 1000
8+
delay = 2000
89
include_ext = ["go", "tmpl"]
910
include_file = ["main.go"]
1011
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]
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"]
12+
exclude_dir = [
13+
"models/fixtures",
14+
"models/migrations/fixtures",
15+
"modules/avatar/identicon/testdata",
16+
"modules/avatar/testdata",
17+
"modules/git/tests",
18+
"modules/migration/file_format_testdata",
19+
"routers/private/tests",
20+
"services/gitdiff/testdata",
21+
]
1222
exclude_regex = ["_test.go$", "_gen.go$"]
1323
stop_on_error = true

.devcontainer/devcontainer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
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": {},
11-
"ghcr.io/devcontainers/features/python:1": {}
11+
"ghcr.io/devcontainers/features/python:1": {
12+
"version": "3.12"
13+
}
1214
},
1315
"customizations": {
1416
"vscode": {
@@ -22,7 +24,7 @@
2224
"DavidAnson.vscode-markdownlint",
2325
"Vue.volar",
2426
"ms-azuretools.vscode-docker",
25-
"zixuanchen.vitest-explorer",
27+
"vitest.explorer",
2628
"qwtel.sqlite-viewer",
2729
"GitHub.vscode-pull-request-github"
2830
]

.dockerignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ _test
1414

1515
# MS VSCode
1616
.vscode
17-
__debug_bin
17+
__debug_bin*
1818

1919
# Architecture specific extensions/prefixes
2020
*.[568vq]
@@ -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,7 +77,7 @@ cpu.out
7877
/public/assets/js
7978
/public/assets/css
8079
/public/assets/fonts
81-
/public/assets/img/webpack
80+
/public/assets/img/avatar
8281
/vendor
8382
/web_src/fomantic/node_modules
8483
/web_src/fomantic/build/*
@@ -96,6 +95,9 @@ cpu.out
9695
/.air
9796
/.go-licenses
9897

98+
# Files and folders that were previously generated
99+
/public/assets/img/webpack
100+
99101
# Snapcraft
100102
snap/.snapcraft/
101103
parts/

.eslintrc.yaml

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ reportUnusedDisableDirectives: true
33

44
ignorePatterns:
55
- /web_src/js/vendor
6+
- /web_src/fomantic
7+
- /public/assets/js
68

79
parserOptions:
810
sourceType: module
@@ -42,10 +44,6 @@ overrides:
4244
worker: true
4345
rules:
4446
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]
4947
- files: ["*.config.*"]
5048
rules:
5149
i/no-unused-modules: [0]
@@ -123,25 +121,27 @@ rules:
123121
"@stylistic/js/arrow-spacing": [2, {before: true, after: true}]
124122
"@stylistic/js/block-spacing": [0]
125123
"@stylistic/js/brace-style": [2, 1tbs, {allowSingleLine: true}]
126-
"@stylistic/js/comma-dangle": [2, only-multiline]
124+
"@stylistic/js/comma-dangle": [2, always-multiline]
127125
"@stylistic/js/comma-spacing": [2, {before: false, after: true}]
128126
"@stylistic/js/comma-style": [2, last]
129127
"@stylistic/js/computed-property-spacing": [2, never]
130128
"@stylistic/js/dot-location": [2, property]
131129
"@stylistic/js/eol-last": [2]
132-
"@stylistic/js/function-call-spacing": [2, never]
133130
"@stylistic/js/function-call-argument-newline": [0]
131+
"@stylistic/js/function-call-spacing": [2, never]
134132
"@stylistic/js/function-paren-newline": [0]
135133
"@stylistic/js/generator-star-spacing": [0]
136134
"@stylistic/js/implicit-arrow-linebreak": [0]
137135
"@stylistic/js/indent": [2, 2, {ignoreComments: true, SwitchCase: 1}]
138136
"@stylistic/js/key-spacing": [2]
139137
"@stylistic/js/keyword-spacing": [2]
138+
"@stylistic/js/line-comment-position": [0]
140139
"@stylistic/js/linebreak-style": [2, unix]
141140
"@stylistic/js/lines-around-comment": [0]
142141
"@stylistic/js/lines-between-class-members": [0]
143142
"@stylistic/js/max-len": [0]
144143
"@stylistic/js/max-statements-per-line": [0]
144+
"@stylistic/js/multiline-comment-style": [0]
145145
"@stylistic/js/multiline-ternary": [0]
146146
"@stylistic/js/new-parens": [2]
147147
"@stylistic/js/newline-per-chained-call": [0]
@@ -171,7 +171,7 @@ rules:
171171
"@stylistic/js/semi-spacing": [2, {before: false, after: true}]
172172
"@stylistic/js/semi-style": [2, last]
173173
"@stylistic/js/space-before-blocks": [2, always]
174-
"@stylistic/js/space-before-function-paren": [0]
174+
"@stylistic/js/space-before-function-paren": [2, {anonymous: ignore, named: never, asyncArrow: always}]
175175
"@stylistic/js/space-in-parens": [2, never]
176176
"@stylistic/js/space-infix-ops": [2]
177177
"@stylistic/js/space-unary-ops": [2]
@@ -283,14 +283,14 @@ rules:
283283
i/unambiguous: [0]
284284
init-declarations: [0]
285285
jquery/no-ajax-events: [2]
286-
jquery/no-ajax: [0]
286+
jquery/no-ajax: [2]
287287
jquery/no-animate: [2]
288-
jquery/no-attr: [0]
288+
jquery/no-attr: [2]
289289
jquery/no-bind: [2]
290290
jquery/no-class: [0]
291291
jquery/no-clone: [2]
292292
jquery/no-closest: [0]
293-
jquery/no-css: [0]
293+
jquery/no-css: [2]
294294
jquery/no-data: [0]
295295
jquery/no-deferred: [2]
296296
jquery/no-delegate: [2]
@@ -307,23 +307,23 @@ rules:
307307
jquery/no-in-array: [2]
308308
jquery/no-is-array: [2]
309309
jquery/no-is-function: [2]
310-
jquery/no-is: [0]
310+
jquery/no-is: [2]
311311
jquery/no-load: [2]
312312
jquery/no-map: [2]
313313
jquery/no-merge: [2]
314314
jquery/no-param: [2]
315315
jquery/no-parent: [0]
316-
jquery/no-parents: [0]
316+
jquery/no-parents: [2]
317317
jquery/no-parse-html: [2]
318-
jquery/no-prop: [0]
318+
jquery/no-prop: [2]
319319
jquery/no-proxy: [2]
320320
jquery/no-ready: [2]
321321
jquery/no-serialize: [2]
322322
jquery/no-show: [2]
323323
jquery/no-size: [2]
324-
jquery/no-sizzle: [0]
325-
jquery/no-slide: [0]
326-
jquery/no-submit: [0]
324+
jquery/no-sizzle: [2]
325+
jquery/no-slide: [2]
326+
jquery/no-submit: [2]
327327
jquery/no-text: [0]
328328
jquery/no-toggle: [2]
329329
jquery/no-trigger: [0]
@@ -396,12 +396,12 @@ rules:
396396
no-irregular-whitespace: [2]
397397
no-iterator: [2]
398398
no-jquery/no-ajax-events: [2]
399-
no-jquery/no-ajax: [0]
399+
no-jquery/no-ajax: [2]
400400
no-jquery/no-and-self: [2]
401401
no-jquery/no-animate-toggle: [2]
402402
no-jquery/no-animate: [2]
403-
no-jquery/no-append-html: [0]
404-
no-jquery/no-attr: [0]
403+
no-jquery/no-append-html: [2]
404+
no-jquery/no-attr: [2]
405405
no-jquery/no-bind: [2]
406406
no-jquery/no-box-model: [2]
407407
no-jquery/no-browser: [2]
@@ -413,7 +413,7 @@ rules:
413413
no-jquery/no-constructor-attributes: [2]
414414
no-jquery/no-contains: [2]
415415
no-jquery/no-context-prop: [2]
416-
no-jquery/no-css: [0]
416+
no-jquery/no-css: [2]
417417
no-jquery/no-data: [0]
418418
no-jquery/no-deferred: [2]
419419
no-jquery/no-delegate: [2]
@@ -444,7 +444,7 @@ rules:
444444
no-jquery/no-is-numeric: [2]
445445
no-jquery/no-is-plain-object: [2]
446446
no-jquery/no-is-window: [2]
447-
no-jquery/no-is: [0]
447+
no-jquery/no-is: [2]
448448
no-jquery/no-jquery-constructor: [0]
449449
no-jquery/no-live: [2]
450450
no-jquery/no-load-shorthand: [2]
@@ -461,19 +461,19 @@ rules:
461461
no-jquery/no-other-utils: [2]
462462
no-jquery/no-param: [2]
463463
no-jquery/no-parent: [0]
464-
no-jquery/no-parents: [0]
464+
no-jquery/no-parents: [2]
465465
no-jquery/no-parse-html-literal: [0]
466466
no-jquery/no-parse-html: [2]
467467
no-jquery/no-parse-json: [2]
468468
no-jquery/no-parse-xml: [2]
469-
no-jquery/no-prop: [0]
469+
no-jquery/no-prop: [2]
470470
no-jquery/no-proxy: [2]
471471
no-jquery/no-ready-shorthand: [2]
472472
no-jquery/no-ready: [2]
473473
no-jquery/no-selector-prop: [2]
474474
no-jquery/no-serialize: [2]
475475
no-jquery/no-size: [2]
476-
no-jquery/no-sizzle: [0]
476+
no-jquery/no-sizzle: [2]
477477
no-jquery/no-slide: [2]
478478
no-jquery/no-sub: [2]
479479
no-jquery/no-support: [2]
@@ -487,7 +487,7 @@ rules:
487487
no-jquery/no-visibility: [2]
488488
no-jquery/no-when: [2]
489489
no-jquery/no-wrap: [2]
490-
no-jquery/variable-pattern: [0]
490+
no-jquery/variable-pattern: [2]
491491
no-label-var: [2]
492492
no-labels: [0] # handled by no-restricted-syntax
493493
no-lone-blocks: [2]
@@ -540,7 +540,7 @@ rules:
540540
no-underscore-dangle: [0]
541541
no-unexpected-multiline: [2]
542542
no-unmodified-loop-condition: [2]
543-
no-unneeded-ternary: [0]
543+
no-unneeded-ternary: [2]
544544
no-unreachable-loop: [2]
545545
no-unreachable: [2]
546546
no-unsafe-finally: [2]
@@ -707,6 +707,7 @@ rules:
707707
unicorn/better-regex: [0]
708708
unicorn/catch-error-name: [0]
709709
unicorn/consistent-destructuring: [2]
710+
unicorn/consistent-empty-array-spread: [2]
710711
unicorn/consistent-function-scoping: [2]
711712
unicorn/custom-error-definition: [0]
712713
unicorn/empty-brace-spaces: [2]
@@ -719,28 +720,33 @@ rules:
719720
unicorn/import-style: [0]
720721
unicorn/new-for-builtins: [2]
721722
unicorn/no-abusive-eslint-disable: [0]
723+
unicorn/no-anonymous-default-export: [0]
722724
unicorn/no-array-callback-reference: [0]
723725
unicorn/no-array-for-each: [2]
724726
unicorn/no-array-method-this-argument: [2]
725727
unicorn/no-array-push-push: [2]
726728
unicorn/no-array-reduce: [2]
727729
unicorn/no-await-expression-member: [0]
730+
unicorn/no-await-in-promise-methods: [2]
728731
unicorn/no-console-spaces: [0]
729732
unicorn/no-document-cookie: [2]
730733
unicorn/no-empty-file: [2]
731734
unicorn/no-for-loop: [0]
732735
unicorn/no-hex-escape: [0]
733736
unicorn/no-instanceof-array: [0]
737+
unicorn/no-invalid-fetch-options: [2]
734738
unicorn/no-invalid-remove-event-listener: [2]
735739
unicorn/no-keyword-prefix: [0]
736740
unicorn/no-lonely-if: [2]
741+
unicorn/no-magic-array-flat-depth: [0]
737742
unicorn/no-negated-condition: [0]
738743
unicorn/no-nested-ternary: [0]
739744
unicorn/no-new-array: [0]
740745
unicorn/no-new-buffer: [0]
741746
unicorn/no-null: [0]
742747
unicorn/no-object-as-default-parameter: [0]
743748
unicorn/no-process-exit: [0]
749+
unicorn/no-single-promise-in-promise-methods: [2]
744750
unicorn/no-static-only-class: [2]
745751
unicorn/no-thenable: [2]
746752
unicorn/no-this-assignment: [2]
@@ -798,10 +804,12 @@ rules:
798804
unicorn/prefer-set-has: [0]
799805
unicorn/prefer-set-size: [2]
800806
unicorn/prefer-spread: [0]
807+
unicorn/prefer-string-raw: [0]
801808
unicorn/prefer-string-replace-all: [0]
802809
unicorn/prefer-string-slice: [0]
803810
unicorn/prefer-string-starts-ends-with: [2]
804811
unicorn/prefer-string-trim-start-end: [2]
812+
unicorn/prefer-structured-clone: [2]
805813
unicorn/prefer-switch: [0]
806814
unicorn/prefer-ternary: [0]
807815
unicorn/prefer-text-content: [2]

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
* text=auto eol=lf
22
*.tmpl linguist-language=Handlebars
3+
*.pb.go linguist-generated
34
/assets/*.json linguist-generated
45
/public/assets/img/svg/*.svg linguist-generated
56
/templates/swagger/v1_json.tmpl linguist-generated

0 commit comments

Comments
 (0)