Skip to content

Commit

Permalink
Merge remote-tracking branch 'giteaofficial/main'
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
zjjhot committed Nov 23, 2022
2 parents f89ed53 + 4d42cbb commit 0906600
Show file tree
Hide file tree
Showing 82 changed files with 1,817 additions and 1,752 deletions.
12 changes: 1 addition & 11 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ steps:
- make lint-frontend
depends_on: [deps-frontend]

- name: security-check
image: golang:1.19
pull: always
commands:
- make security-check
depends_on: [deps-backend]
volumes:
- name: deps
path: /go

- name: lint-backend
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
pull: always
Expand Down Expand Up @@ -561,7 +551,7 @@ steps:

# TODO: We should probably build all dependencies into a test image
- name: test-e2e
image: mcr.microsoft.com/playwright:v1.27.1-focal
image: mcr.microsoft.com/playwright:v1.28.0-focal
commands:
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
Expand Down
7 changes: 6 additions & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ rules:
newline-per-chained-call: [0]
no-alert: [0]
no-array-constructor: [2]
no-async-promise-executor: [2]
no-async-promise-executor: [0]
no-await-in-loop: [0]
no-bitwise: [0]
no-buffer-constructor: [0]
Expand Down Expand Up @@ -229,6 +229,7 @@ rules:
no-empty-character-class: [2]
no-empty-function: [0]
no-empty-pattern: [2]
no-empty-static-block: [2]
no-empty: [2, {allowEmptyCatch: true}]
no-eq-null: [2]
no-eval: [2]
Expand Down Expand Up @@ -269,6 +270,7 @@ rules:
no-negated-condition: [0]
no-nested-ternary: [0]
no-new-func: [2]
no-new-native-nonconstructor: [2]
no-new-object: [2]
no-new-symbol: [2]
no-new-wrappers: [2]
Expand Down Expand Up @@ -443,6 +445,7 @@ rules:
unicorn/no-invalid-remove-event-listener: [2]
unicorn/no-keyword-prefix: [0]
unicorn/no-lonely-if: [2]
unicorn/no-negated-condition: [0]
unicorn/no-nested-ternary: [0]
unicorn/no-new-array: [0]
unicorn/no-new-buffer: [0]
Expand All @@ -453,6 +456,7 @@ rules:
unicorn/no-static-only-class: [2]
unicorn/no-thenable: [2]
unicorn/no-this-assignment: [2]
unicorn/no-typeof-undefined: [2]
unicorn/no-unnecessary-await: [2]
unicorn/no-unreadable-array-destructuring: [0]
unicorn/no-unreadable-iife: [2]
Expand Down Expand Up @@ -503,6 +507,7 @@ rules:
unicorn/prefer-regexp-test: [2]
unicorn/prefer-replace-all: [0]
unicorn/prefer-set-has: [0]
unicorn/prefer-set-size: [2]
unicorn/prefer-spread: [0]
unicorn/prefer-starts-ends-with: [2]
unicorn/prefer-string-slice: [0]
Expand Down
11 changes: 11 additions & 0 deletions .stylelintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
extends: stylelint-config-standard

plugins:
- stylelint-declaration-strict-value

overrides:
- files: ["**/*.less"]
customSyntax: postcss-less
- files: ["**/*.less"]
rules:
scale-unlimited/declaration-strict-value: [color, {
ignoreValues: /^(inherit|transparent|unset|initial)$/
}]
- files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console/*"]
rules:
scale-unlimited/declaration-strict-value: null

rules:
alpha-value-notation: null
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ checks: checks-frontend checks-backend
checks-frontend: lockfile-check svg-check

.PHONY: checks-backend
checks-backend: tidy-check swagger-check fmt-check misspell-check swagger-validate
checks-backend: tidy-check swagger-check fmt-check misspell-check swagger-validate security-check

.PHONY: lint
lint: lint-frontend lint-backend
Expand Down Expand Up @@ -745,7 +745,7 @@ generate-go: $(TAGS_PREREQ)

.PHONY: security-check
security-check:
govulncheck -v ./...
go run $(GOVULNCHECK_PACKAGE) -v ./...

$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
Expand Down
7 changes: 6 additions & 1 deletion custom/conf/app.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,9 @@ ROUTER = console
;; Enable captcha validation for registration
;ENABLE_CAPTCHA = false
;;
;; Enable this to require captcha validation for login
;REQUIRE_CAPTCHA_FOR_LOGIN = false
;;
;; Type of captcha you want to use. Options: image, recaptcha, hcaptcha, mcaptcha.
;CAPTCHA_TYPE = image
;;
Expand Down Expand Up @@ -2234,7 +2237,9 @@ ROUTER = console
;; Show template execution time in the footer
;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
;; Generate sitemap. Defaults to `true`.
; ENABLE_SITEMAP = true
;ENABLE_SITEMAP = true
;; Enable/Disable RSS/Atom feed
;ENABLE_FEED = true

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/advanced/config-cheat-sheet.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
- `ENABLE_REVERSE_PROXY_FULL_NAME`: **false**: Enable this to allow to auto-registration with a
provided full name for the user.
- `ENABLE_CAPTCHA`: **false**: Enable this to use captcha validation for registration.
- `REQUIRE_CAPTCHA_FOR_LOGIN`: **false**: Enable this to require captcha validation for login. You also must enable `ENABLE_CAPTCHA`.
- `REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA`: **false**: Enable this to force captcha validation
even for External Accounts (i.e. GitHub, OpenID Connect, etc). You also must enable `ENABLE_CAPTCHA`.
- `CAPTCHA_TYPE`: **image**: \[image, recaptcha, hcaptcha, mcaptcha\]
Expand Down Expand Up @@ -1288,3 +1289,4 @@ PROXY_HOSTS = *.github.com
- `SHOW_FOOTER_VERSION`: **true**: Show Gitea and Go version information in the footer.
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: Show time of template execution in the footer.
- `ENABLE_SITEMAP`: **true**: Generate sitemap.
- `ENABLE_FEED`: **true**: Enable/Disable RSS/Atom feed.
3 changes: 2 additions & 1 deletion docs/content/doc/advanced/config-cheat-sheet.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ menu:
- `ENABLE_NOTIFY_MAIL`: 是否发送工单创建等提醒邮件,需要 `Mailer` 被激活。
- `ENABLE_REVERSE_PROXY_AUTHENTICATION`: 允许反向代理认证,更多细节见:https://github.com/gogits/gogs/issues/165
- `ENABLE_REVERSE_PROXY_AUTO_REGISTRATION`: 允许通过反向认证做自动注册。
- `ENABLE_CAPTCHA`: 注册时使用图片验证码。
- `ENABLE_CAPTCHA`: **false**: 注册时使用图片验证码。
- `REQUIRE_CAPTCHA_FOR_LOGIN`: **false**: 登录时需要图片验证码。需要同时开启 `ENABLE_CAPTCHA`

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

Expand Down
Loading

0 comments on commit 0906600

Please sign in to comment.