Skip to content

Commit 0906600

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Handle empty author names (go-gitea#21902) Move all remaining colors into CSS variables (go-gitea#21903) Add option to enable CAPTCHA validation for login (go-gitea#21638) Prepend refs/heads/ to issue template refs (go-gitea#20461) Fixes go-gitea#21895: standardize UTC tz for util tests (go-gitea#21897) Clarify logging documentation (go-gitea#21665) Update JS dependencies (go-gitea#21881) Webhook list enhancements (go-gitea#21893) Embed Matrix icon as SVG (go-gitea#21890) fix(web): add `alt` for logo in home page (go-gitea#21887) Improvements for Content Copy (go-gitea#21842) Replace yaml.v2 with yaml.v3 (go-gitea#21832) Allow disable RSS/Atom feed (go-gitea#21622) Consolidate security-check into checks-backend (go-gitea#21882)
2 parents f89ed53 + 4d42cbb commit 0906600

File tree

82 files changed

+1817
-1752
lines changed

Some content is hidden

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

82 files changed

+1817
-1752
lines changed

.drone.yml

+1-11
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ steps:
3939
- make lint-frontend
4040
depends_on: [deps-frontend]
4141

42-
- name: security-check
43-
image: golang:1.19
44-
pull: always
45-
commands:
46-
- make security-check
47-
depends_on: [deps-backend]
48-
volumes:
49-
- name: deps
50-
path: /go
51-
5242
- name: lint-backend
5343
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
5444
pull: always
@@ -561,7 +551,7 @@ steps:
561551

562552
# TODO: We should probably build all dependencies into a test image
563553
- name: test-e2e
564-
image: mcr.microsoft.com/playwright:v1.27.1-focal
554+
image: mcr.microsoft.com/playwright:v1.28.0-focal
565555
commands:
566556
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
567557
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea

.eslintrc.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ rules:
199199
newline-per-chained-call: [0]
200200
no-alert: [0]
201201
no-array-constructor: [2]
202-
no-async-promise-executor: [2]
202+
no-async-promise-executor: [0]
203203
no-await-in-loop: [0]
204204
no-bitwise: [0]
205205
no-buffer-constructor: [0]
@@ -229,6 +229,7 @@ rules:
229229
no-empty-character-class: [2]
230230
no-empty-function: [0]
231231
no-empty-pattern: [2]
232+
no-empty-static-block: [2]
232233
no-empty: [2, {allowEmptyCatch: true}]
233234
no-eq-null: [2]
234235
no-eval: [2]
@@ -269,6 +270,7 @@ rules:
269270
no-negated-condition: [0]
270271
no-nested-ternary: [0]
271272
no-new-func: [2]
273+
no-new-native-nonconstructor: [2]
272274
no-new-object: [2]
273275
no-new-symbol: [2]
274276
no-new-wrappers: [2]
@@ -443,6 +445,7 @@ rules:
443445
unicorn/no-invalid-remove-event-listener: [2]
444446
unicorn/no-keyword-prefix: [0]
445447
unicorn/no-lonely-if: [2]
448+
unicorn/no-negated-condition: [0]
446449
unicorn/no-nested-ternary: [0]
447450
unicorn/no-new-array: [0]
448451
unicorn/no-new-buffer: [0]
@@ -453,6 +456,7 @@ rules:
453456
unicorn/no-static-only-class: [2]
454457
unicorn/no-thenable: [2]
455458
unicorn/no-this-assignment: [2]
459+
unicorn/no-typeof-undefined: [2]
456460
unicorn/no-unnecessary-await: [2]
457461
unicorn/no-unreadable-array-destructuring: [0]
458462
unicorn/no-unreadable-iife: [2]
@@ -503,6 +507,7 @@ rules:
503507
unicorn/prefer-regexp-test: [2]
504508
unicorn/prefer-replace-all: [0]
505509
unicorn/prefer-set-has: [0]
510+
unicorn/prefer-set-size: [2]
506511
unicorn/prefer-spread: [0]
507512
unicorn/prefer-starts-ends-with: [2]
508513
unicorn/prefer-string-slice: [0]

.stylelintrc.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
extends: stylelint-config-standard
22

3+
plugins:
4+
- stylelint-declaration-strict-value
5+
36
overrides:
47
- files: ["**/*.less"]
58
customSyntax: postcss-less
9+
- files: ["**/*.less"]
10+
rules:
11+
scale-unlimited/declaration-strict-value: [color, {
12+
ignoreValues: /^(inherit|transparent|unset|initial)$/
13+
}]
14+
- files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console/*"]
15+
rules:
16+
scale-unlimited/declaration-strict-value: null
617

718
rules:
819
alpha-value-notation: null

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ checks: checks-frontend checks-backend
333333
checks-frontend: lockfile-check svg-check
334334

335335
.PHONY: checks-backend
336-
checks-backend: tidy-check swagger-check fmt-check misspell-check swagger-validate
336+
checks-backend: tidy-check swagger-check fmt-check misspell-check swagger-validate security-check
337337

338338
.PHONY: lint
339339
lint: lint-frontend lint-backend
@@ -745,7 +745,7 @@ generate-go: $(TAGS_PREREQ)
745745

746746
.PHONY: security-check
747747
security-check:
748-
govulncheck -v ./...
748+
go run $(GOVULNCHECK_PACKAGE) -v ./...
749749

750750
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
751751
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@

custom/conf/app.example.ini

+6-1
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,9 @@ ROUTER = console
759759
;; Enable captcha validation for registration
760760
;ENABLE_CAPTCHA = false
761761
;;
762+
;; Enable this to require captcha validation for login
763+
;REQUIRE_CAPTCHA_FOR_LOGIN = false
764+
;;
762765
;; Type of captcha you want to use. Options: image, recaptcha, hcaptcha, mcaptcha.
763766
;CAPTCHA_TYPE = image
764767
;;
@@ -2234,7 +2237,9 @@ ROUTER = console
22342237
;; Show template execution time in the footer
22352238
;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
22362239
;; Generate sitemap. Defaults to `true`.
2237-
; ENABLE_SITEMAP = true
2240+
;ENABLE_SITEMAP = true
2241+
;; Enable/Disable RSS/Atom feed
2242+
;ENABLE_FEED = true
22382243

22392244
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22402245
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/content/doc/advanced/config-cheat-sheet.en-us.md

+2
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
634634
- `ENABLE_REVERSE_PROXY_FULL_NAME`: **false**: Enable this to allow to auto-registration with a
635635
provided full name for the user.
636636
- `ENABLE_CAPTCHA`: **false**: Enable this to use captcha validation for registration.
637+
- `REQUIRE_CAPTCHA_FOR_LOGIN`: **false**: Enable this to require captcha validation for login. You also must enable `ENABLE_CAPTCHA`.
637638
- `REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA`: **false**: Enable this to force captcha validation
638639
even for External Accounts (i.e. GitHub, OpenID Connect, etc). You also must enable `ENABLE_CAPTCHA`.
639640
- `CAPTCHA_TYPE`: **image**: \[image, recaptcha, hcaptcha, mcaptcha\]
@@ -1288,3 +1289,4 @@ PROXY_HOSTS = *.github.com
12881289
- `SHOW_FOOTER_VERSION`: **true**: Show Gitea and Go version information in the footer.
12891290
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: Show time of template execution in the footer.
12901291
- `ENABLE_SITEMAP`: **true**: Generate sitemap.
1292+
- `ENABLE_FEED`: **true**: Enable/Disable RSS/Atom feed.

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ menu:
145145
- `ENABLE_NOTIFY_MAIL`: 是否发送工单创建等提醒邮件,需要 `Mailer` 被激活。
146146
- `ENABLE_REVERSE_PROXY_AUTHENTICATION`: 允许反向代理认证,更多细节见:https://github.com/gogits/gogs/issues/165
147147
- `ENABLE_REVERSE_PROXY_AUTO_REGISTRATION`: 允许通过反向认证做自动注册。
148-
- `ENABLE_CAPTCHA`: 注册时使用图片验证码。
148+
- `ENABLE_CAPTCHA`: **false**: 注册时使用图片验证码。
149+
- `REQUIRE_CAPTCHA_FOR_LOGIN`: **false**: 登录时需要图片验证码。需要同时开启 `ENABLE_CAPTCHA`
149150

150151
### Service - Expore (`service.explore`)
151152

0 commit comments

Comments
 (0)