Skip to content

Commit 28ec3e8

Browse files
Merge branch 'main' into fix/31709
2 parents 05641c9 + 01dec75 commit 28ec3e8

File tree

287 files changed

+14225
-7741
lines changed

Some content is hidden

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

287 files changed

+14225
-7741
lines changed

.eslintrc.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ rules:
224224
"@typescript-eslint/await-thenable": [2]
225225
"@typescript-eslint/ban-ts-comment": [2, {'ts-expect-error': false, 'ts-ignore': true, 'ts-nocheck': false, 'ts-check': false}]
226226
"@typescript-eslint/ban-tslint-comment": [0]
227-
"@typescript-eslint/ban-types": [2, {extendDefaults: true, types: {Function: false}}]
228227
"@typescript-eslint/class-literal-property-style": [0]
229228
"@typescript-eslint/class-methods-use-this": [0]
230229
"@typescript-eslint/consistent-generic-constructors": [0]
@@ -255,6 +254,7 @@ rules:
255254
"@typescript-eslint/no-dynamic-delete": [0]
256255
"@typescript-eslint/no-empty-function": [0]
257256
"@typescript-eslint/no-empty-interface": [0]
257+
"@typescript-eslint/no-empty-object-type": [2]
258258
"@typescript-eslint/no-explicit-any": [0]
259259
"@typescript-eslint/no-extra-non-null-assertion": [2]
260260
"@typescript-eslint/no-extraneous-class": [0]
@@ -266,7 +266,7 @@ rules:
266266
"@typescript-eslint/no-invalid-this": [0]
267267
"@typescript-eslint/no-invalid-void-type": [0]
268268
"@typescript-eslint/no-loop-func": [0]
269-
"@typescript-eslint/no-loss-of-precision": [2]
269+
"@typescript-eslint/no-loss-of-precision": [0]
270270
"@typescript-eslint/no-magic-numbers": [0]
271271
"@typescript-eslint/no-meaningless-void-operator": [0]
272272
"@typescript-eslint/no-misused-new": [2]
@@ -278,8 +278,9 @@ rules:
278278
"@typescript-eslint/no-non-null-assertion": [0]
279279
"@typescript-eslint/no-redeclare": [0]
280280
"@typescript-eslint/no-redundant-type-constituents": [2]
281-
"@typescript-eslint/no-require-imports": [0]
281+
"@typescript-eslint/no-require-imports": [2]
282282
"@typescript-eslint/no-restricted-imports": [0]
283+
"@typescript-eslint/no-restricted-types": [0]
283284
"@typescript-eslint/no-shadow": [0]
284285
"@typescript-eslint/no-this-alias": [0] # handled by unicorn/no-this-assignment
285286
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [0]
@@ -294,6 +295,7 @@ rules:
294295
"@typescript-eslint/no-unsafe-call": [0]
295296
"@typescript-eslint/no-unsafe-declaration-merging": [2]
296297
"@typescript-eslint/no-unsafe-enum-comparison": [2]
298+
"@typescript-eslint/no-unsafe-function-type": [2]
297299
"@typescript-eslint/no-unsafe-member-access": [0]
298300
"@typescript-eslint/no-unsafe-return": [0]
299301
"@typescript-eslint/no-unsafe-unary-minus": [2]
@@ -302,7 +304,7 @@ rules:
302304
"@typescript-eslint/no-use-before-define": [0]
303305
"@typescript-eslint/no-useless-constructor": [0]
304306
"@typescript-eslint/no-useless-empty-export": [0]
305-
"@typescript-eslint/no-var-requires": [2]
307+
"@typescript-eslint/no-wrapper-object-types": [2]
306308
"@typescript-eslint/non-nullable-type-assertion-style": [0]
307309
"@typescript-eslint/only-throw-error": [2]
308310
"@typescript-eslint/parameter-properties": [0]
@@ -334,7 +336,7 @@ rules:
334336
"@typescript-eslint/switch-exhaustiveness-check": [0]
335337
"@typescript-eslint/triple-slash-reference": [2]
336338
"@typescript-eslint/typedef": [0]
337-
"@typescript-eslint/unbound-method": [2]
339+
"@typescript-eslint/unbound-method": [0] # too many false-positives
338340
"@typescript-eslint/unified-signatures": [2]
339341
accessor-pairs: [2]
340342
array-callback-return: [2, {checkForEach: true}]
@@ -599,7 +601,7 @@ rules:
599601
no-lone-blocks: [2]
600602
no-lonely-if: [0]
601603
no-loop-func: [0]
602-
no-loss-of-precision: [0] # handled by @typescript-eslint/no-loss-of-precision
604+
no-loss-of-precision: [2]
603605
no-magic-numbers: [0]
604606
no-misleading-character-class: [2]
605607
no-multi-assign: [0]
@@ -843,6 +845,7 @@ rules:
843845
unicorn/no-invalid-fetch-options: [2]
844846
unicorn/no-invalid-remove-event-listener: [2]
845847
unicorn/no-keyword-prefix: [0]
848+
unicorn/no-length-as-slice-end: [2]
846849
unicorn/no-lonely-if: [2]
847850
unicorn/no-magic-array-flat-depth: [0]
848851
unicorn/no-negated-condition: [0]

.github/ISSUE_TEMPLATE/bug-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ body:
1111
value: |
1212
1. Please speak English, this is the language all maintainers can speak and write.
1313
2. Please ask questions or configuration/deploy problems on our Discord
14-
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
14+
server (https://discord.gg/gitea) or forum (https://forum.gitea.com).
1515
3. Make sure you are using the latest release and
1616
take a moment to check that your issue hasn't been reported before.
1717
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.com/help/faq)

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ contact_links:
77
url: https://discord.gg/Gitea
88
about: Please ask questions and discuss configuration or deployment problems here.
99
- name: Discourse Forum
10-
url: https://discourse.gitea.io
10+
url: https://forum.gitea.com
1111
about: Questions and configuration or deployment problems can also be discussed on our forum.
1212
- name: Frequently Asked Questions
1313
url: https://docs.gitea.com/help/faq

.github/ISSUE_TEMPLATE/feature-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
value: |
88
1. Please speak English, this is the language all maintainers can speak and write.
99
2. Please ask questions or configuration/deploy problems on our Discord
10-
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
10+
server (https://discord.gg/gitea) or forum (https://forum.gitea.com).
1111
3. Please take a moment to check that your feature hasn't already been suggested.
1212
- type: textarea
1313
id: description

.github/ISSUE_TEMPLATE/ui.bug-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ body:
1111
value: |
1212
1. Please speak English, this is the language all maintainers can speak and write.
1313
2. Please ask questions or configuration/deploy problems on our Discord
14-
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
14+
server (https://discord.gg/gitea) or forum (https://forum.gitea.com).
1515
3. Please take a moment to check that your issue doesn't already exist.
1616
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.com/help/faq)
1717
5. Please give all relevant information below for bug reports, because

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,8 @@ modifies/js:
7575
- any-glob-to-any-file:
7676
- "**/*.js"
7777
- "**/*.vue"
78+
79+
docs-update-needed:
80+
- changed-files:
81+
- any-glob-to-any-file:
82+
- "custom/conf/app.example.ini"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ TAGS ?=
137137
TAGS_SPLIT := $(subst $(COMMA), ,$(TAGS))
138138
TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
139139

140-
TEST_TAGS ?= sqlite sqlite_unlock_notify
140+
TEST_TAGS ?= $(TAGS_SPLIT) sqlite sqlite_unlock_notify
141141

142142
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
143143

assets/go-licenses.json

Lines changed: 34 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/hook.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,22 @@ Gitea or set your environment appropriately.`, "")
290290
return nil
291291
}
292292

293+
// runHookUpdate avoid to do heavy operations on update hook because it will be
294+
// invoked for every ref update which does not like pre-receive and post-receive
293295
func runHookUpdate(c *cli.Context) error {
296+
if isInternal, _ := strconv.ParseBool(os.Getenv(repo_module.EnvIsInternal)); isInternal {
297+
return nil
298+
}
299+
294300
// Update is empty and is kept only for backwards compatibility
301+
if len(os.Args) < 3 {
302+
return nil
303+
}
304+
refName := git.RefName(os.Args[len(os.Args)-3])
305+
if refName.IsPull() {
306+
// ignore update to refs/pull/xxx/head, so we don't need to output any information
307+
os.Exit(1)
308+
}
295309
return nil
296310
}
297311

custom/conf/app.example.ini

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2555,7 +2555,8 @@ LEVEL = Info
25552555
;LIMIT_SIZE_SWIFT = -1
25562556
;; Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
25572557
;LIMIT_SIZE_VAGRANT = -1
2558-
2558+
;; Enable RPM re-signing by default. (It will overwrite the old signature ,using v4 format, not compatible with CentOS 6 or older)
2559+
;DEFAULT_RPM_SIGN_ENABLED = false
25592560
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25602561
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25612562
;; default storage for attachments, lfs and avatars
@@ -2684,6 +2685,14 @@ LEVEL = Info
26842685
;;
26852686
;; Default platform to get action plugins, `github` for `https://github.com`, `self` for the current Gitea instance.
26862687
;DEFAULT_ACTIONS_URL = github
2688+
;; Logs retention time in days. Old logs will be deleted after this period.
2689+
;LOG_RETENTION_DAYS = 365
2690+
;; Log compression type, `none` for no compression, `zstd` for zstd compression.
2691+
;; Other compression types like `gzip` are NOT supported, since seekable stream is required for log view.
2692+
;; It's always recommended to use compression when using local disk as log storage if CPU or memory is not a bottleneck.
2693+
;; And for object storage services like S3, which is billed for requests, it would cause extra 2 times of get requests for each log view.
2694+
;; But it will save storage space and network bandwidth, so it's still recommended to use compression.
2695+
;LOG_COMPRESSION = none
26872696
;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
26882697
;ARTIFACT_RETENTION_DAYS = 90
26892698
;; Timeout to stop the task which have running status, but haven't been updated for a long time
@@ -2704,3 +2713,9 @@ LEVEL = Info
27042713
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27052714
;; storage type
27062715
;STORAGE_TYPE = local
2716+
2717+
;[global_lock]
2718+
;; Lock service type, could be memory or redis
2719+
;SERVICE_TYPE = memory
2720+
;; Ignored for the "memory" type. For "redis" use something like `redis://127.0.0.1:6379/0`
2721+
;SERVICE_CONN_STR =

0 commit comments

Comments
 (0)