Skip to content

Commit b01e70b

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: Update JS dependencies (go-gitea#27922) Update environment-to-ini flag parsing (go-gitea#27914) Add `--no-root` to `update-py` (go-gitea#27937) Remove `known issue` section in Gitea Actions Doc (go-gitea#27930)
2 parents 5780e1a + abd79dd commit b01e70b

19 files changed

+751
-694
lines changed

.eslintrc.yaml

Lines changed: 67 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ parserOptions:
1010

1111
plugins:
1212
- "@eslint-community/eslint-plugin-eslint-comments"
13+
- "@stylistic/eslint-plugin-js"
1314
- eslint-plugin-array-func
1415
- eslint-plugin-i
1516
- eslint-plugin-jquery
@@ -114,56 +115,105 @@ rules:
114115
"@eslint-community/eslint-comments/no-unused-enable": [2]
115116
"@eslint-community/eslint-comments/no-use": [0]
116117
"@eslint-community/eslint-comments/require-description": [0]
118+
"@stylistic/js/array-bracket-newline": [0]
119+
"@stylistic/js/array-bracket-spacing": [2, never]
120+
"@stylistic/js/array-element-newline": [0]
121+
"@stylistic/js/arrow-parens": [2, always]
122+
"@stylistic/js/arrow-spacing": [2, {before: true, after: true}]
123+
"@stylistic/js/block-spacing": [0]
124+
"@stylistic/js/brace-style": [2, 1tbs, {allowSingleLine: true}]
125+
"@stylistic/js/comma-dangle": [2, only-multiline]
126+
"@stylistic/js/comma-spacing": [2, {before: false, after: true}]
127+
"@stylistic/js/comma-style": [2, last]
128+
"@stylistic/js/computed-property-spacing": [2, never]
129+
"@stylistic/js/dot-location": [2, property]
130+
"@stylistic/js/eol-last": [2]
131+
"@stylistic/js/func-call-spacing": [2, never]
132+
"@stylistic/js/function-call-argument-newline": [0]
133+
"@stylistic/js/function-paren-newline": [0]
134+
"@stylistic/js/generator-star-spacing": [0]
135+
"@stylistic/js/implicit-arrow-linebreak": [0]
136+
"@stylistic/js/indent": [2, 2, {ignoreComments: true, SwitchCase: 1}]
137+
"@stylistic/js/key-spacing": [2]
138+
"@stylistic/js/keyword-spacing": [2]
139+
"@stylistic/js/linebreak-style": [2, unix]
140+
"@stylistic/js/lines-around-comment": [0]
141+
"@stylistic/js/lines-between-class-members": [0]
142+
"@stylistic/js/max-len": [0]
143+
"@stylistic/js/max-statements-per-line": [0]
144+
"@stylistic/js/multiline-ternary": [0]
145+
"@stylistic/js/new-parens": [2]
146+
"@stylistic/js/newline-per-chained-call": [0]
147+
"@stylistic/js/no-confusing-arrow": [0]
148+
"@stylistic/js/no-extra-parens": [0]
149+
"@stylistic/js/no-extra-semi": [2]
150+
"@stylistic/js/no-floating-decimal": [0]
151+
"@stylistic/js/no-mixed-operators": [0]
152+
"@stylistic/js/no-mixed-spaces-and-tabs": [2]
153+
"@stylistic/js/no-multi-spaces": [2, {ignoreEOLComments: true, exceptions: {Property: true}}]
154+
"@stylistic/js/no-multiple-empty-lines": [2, {max: 1, maxEOF: 0, maxBOF: 0}]
155+
"@stylistic/js/no-tabs": [2]
156+
"@stylistic/js/no-trailing-spaces": [2]
157+
"@stylistic/js/no-whitespace-before-property": [2]
158+
"@stylistic/js/nonblock-statement-body-position": [2]
159+
"@stylistic/js/object-curly-newline": [0]
160+
"@stylistic/js/object-curly-spacing": [2, never]
161+
"@stylistic/js/object-property-newline": [0]
162+
"@stylistic/js/one-var-declaration-per-line": [0]
163+
"@stylistic/js/operator-linebreak": [2, after]
164+
"@stylistic/js/padded-blocks": [2, never]
165+
"@stylistic/js/padding-line-between-statements": [0]
166+
"@stylistic/js/quote-props": [0]
167+
"@stylistic/js/quotes": [2, single, {avoidEscape: true, allowTemplateLiterals: true}]
168+
"@stylistic/js/rest-spread-spacing": [2, never]
169+
"@stylistic/js/semi": [2, always, {omitLastInOneLineBlock: true}]
170+
"@stylistic/js/semi-spacing": [2, {before: false, after: true}]
171+
"@stylistic/js/semi-style": [2, last]
172+
"@stylistic/js/space-before-blocks": [2, always]
173+
"@stylistic/js/space-before-function-paren": [0]
174+
"@stylistic/js/space-in-parens": [2, never]
175+
"@stylistic/js/space-infix-ops": [2]
176+
"@stylistic/js/space-unary-ops": [2]
177+
"@stylistic/js/spaced-comment": [2, always]
178+
"@stylistic/js/switch-colon-spacing": [2]
179+
"@stylistic/js/template-curly-spacing": [2, never]
180+
"@stylistic/js/template-tag-spacing": [2, never]
181+
"@stylistic/js/wrap-iife": [2, inside]
182+
"@stylistic/js/wrap-regex": [0]
183+
"@stylistic/js/yield-star-spacing": [2, after]
117184
accessor-pairs: [2]
118-
array-bracket-newline: [0]
119-
array-bracket-spacing: [2, never]
120185
array-callback-return: [2, {checkForEach: true}]
121-
array-element-newline: [0]
122186
array-func/avoid-reverse: [2]
123187
array-func/from-map: [2]
124188
array-func/no-unnecessary-this-arg: [2]
125189
array-func/prefer-array-from: [2]
126190
array-func/prefer-flat-map: [0] # handled by unicorn/prefer-array-flat-map
127191
array-func/prefer-flat: [0] # handled by unicorn/prefer-array-flat
128192
arrow-body-style: [0]
129-
arrow-parens: [2, always]
130-
arrow-spacing: [2, {before: true, after: true}]
131193
block-scoped-var: [2]
132-
brace-style: [2, 1tbs, {allowSingleLine: true}]
133194
camelcase: [0]
134195
capitalized-comments: [0]
135196
class-methods-use-this: [0]
136-
comma-dangle: [2, only-multiline]
137-
comma-spacing: [2, {before: false, after: true}]
138-
comma-style: [2, last]
139197
complexity: [0]
140-
computed-property-spacing: [2, never]
141198
consistent-return: [0]
142199
consistent-this: [0]
143200
constructor-super: [2]
144201
curly: [0]
145202
default-case-last: [2]
146203
default-case: [0]
147204
default-param-last: [0]
148-
dot-location: [2, property]
149205
dot-notation: [0]
150-
eol-last: [2]
151206
eqeqeq: [2]
152207
for-direction: [2]
153-
func-call-spacing: [2, never]
154208
func-name-matching: [2]
155209
func-names: [0]
156210
func-style: [0]
157-
function-call-argument-newline: [0]
158-
function-paren-newline: [0]
159-
generator-star-spacing: [0]
160211
getter-return: [2]
161212
grouped-accessor-pairs: [2]
162213
guard-for-in: [0]
163214
id-blacklist: [0]
164215
id-length: [0]
165216
id-match: [0]
166-
implicit-arrow-linebreak: [0]
167217
i/consistent-type-specifier-style: [0]
168218
i/default: [0]
169219
i/dynamic-import-chunkname: [0]
@@ -207,7 +257,6 @@ rules:
207257
i/order: [0]
208258
i/prefer-default-export: [0]
209259
i/unambiguous: [0]
210-
indent: [2, 2, {SwitchCase: 1}]
211260
init-declarations: [0]
212261
jquery/no-ajax-events: [2]
213262
jquery/no-ajax: [0]
@@ -258,27 +307,17 @@ rules:
258307
jquery/no-val: [0]
259308
jquery/no-when: [2]
260309
jquery/no-wrap: [2]
261-
key-spacing: [2]
262-
keyword-spacing: [2]
263310
line-comment-position: [0]
264-
linebreak-style: [2, unix]
265-
lines-around-comment: [0]
266-
lines-between-class-members: [0]
267311
logical-assignment-operators: [0]
268312
max-classes-per-file: [0]
269313
max-depth: [0]
270-
max-len: [0]
271314
max-lines-per-function: [0]
272315
max-lines: [0]
273316
max-nested-callbacks: [0]
274317
max-params: [0]
275-
max-statements-per-line: [0]
276318
max-statements: [0]
277319
multiline-comment-style: [2, separate-lines]
278-
multiline-ternary: [0]
279320
new-cap: [0]
280-
new-parens: [2]
281-
newline-per-chained-call: [0]
282321
no-alert: [0]
283322
no-array-constructor: [2]
284323
no-async-promise-executor: [0]
@@ -290,7 +329,6 @@ rules:
290329
no-class-assign: [2]
291330
no-compare-neg-zero: [2]
292331
no-cond-assign: [2, except-parens]
293-
no-confusing-arrow: [0]
294332
no-console: [1, {allow: [debug, info, warn, error]}]
295333
no-const-assign: [2]
296334
no-constant-binary-expression: [2]
@@ -320,10 +358,7 @@ rules:
320358
no-extra-bind: [2]
321359
no-extra-boolean-cast: [2]
322360
no-extra-label: [0]
323-
no-extra-parens: [0]
324-
no-extra-semi: [2]
325361
no-fallthrough: [2]
326-
no-floating-decimal: [0]
327362
no-func-assign: [2]
328363
no-global-assign: [2]
329364
no-implicit-coercion: [2]
@@ -437,10 +472,7 @@ rules:
437472
no-loss-of-precision: [2]
438473
no-magic-numbers: [0]
439474
no-misleading-character-class: [2]
440-
no-mixed-operators: [0]
441-
no-mixed-spaces-and-tabs: [2]
442475
no-multi-assign: [0]
443-
no-multi-spaces: [2, {ignoreEOLComments: true, exceptions: {Property: true}}]
444476
no-multi-str: [2]
445477
no-negated-condition: [0]
446478
no-nested-ternary: [0]
@@ -474,12 +506,10 @@ rules:
474506
no-shadow-restricted-names: [2]
475507
no-shadow: [0]
476508
no-sparse-arrays: [2]
477-
no-tabs: [2]
478509
no-template-curly-in-string: [2]
479510
no-ternary: [0]
480511
no-this-before-super: [2]
481512
no-throw-literal: [2]
482-
no-trailing-spaces: [2]
483513
no-undef-init: [2]
484514
no-undef: [2, {typeof: true}]
485515
no-undefined: [0]
@@ -509,18 +539,12 @@ rules:
509539
no-var: [2]
510540
no-void: [2]
511541
no-warning-comments: [0]
512-
no-whitespace-before-property: [2]
513542
no-with: [0] # handled by no-restricted-syntax
514-
nonblock-statement-body-position: [2]
515-
object-curly-newline: [0]
516-
object-curly-spacing: [2, never]
517543
object-shorthand: [2, always]
518544
one-var-declaration-per-line: [0]
519545
one-var: [0]
520546
operator-assignment: [2, always]
521547
operator-linebreak: [2, after]
522-
padded-blocks: [2, never]
523-
padding-line-between-statements: [0]
524548
prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
525549
prefer-const: [2, {destructuring: all, ignoreReadBeforeAssign: true}]
526550
prefer-destructuring: [0]
@@ -534,7 +558,6 @@ rules:
534558
prefer-rest-params: [2]
535559
prefer-spread: [2]
536560
prefer-template: [2]
537-
quote-props: [0]
538561
quotes: [2, single, {avoidEscape: true, allowTemplateLiterals: true}]
539562
radix: [2, as-needed]
540563
regexp/confusing-quantifier: [2]
@@ -620,10 +643,6 @@ rules:
620643
require-await: [0]
621644
require-unicode-regexp: [0]
622645
require-yield: [2]
623-
rest-spread-spacing: [2, never]
624-
semi-spacing: [2, {before: false, after: true}]
625-
semi-style: [2, last]
626-
semi: [2, always, {omitLastInOneLineBlock: true}]
627646
sonarjs/cognitive-complexity: [0]
628647
sonarjs/elseif-without-else: [0]
629648
sonarjs/max-switch-cases: [0]
@@ -659,16 +678,8 @@ rules:
659678
sort-imports: [0]
660679
sort-keys: [0]
661680
sort-vars: [0]
662-
space-before-blocks: [2, always]
663-
space-in-parens: [2, never]
664-
space-infix-ops: [2]
665-
space-unary-ops: [2]
666-
spaced-comment: [2, always]
667681
strict: [0]
668-
switch-colon-spacing: [2]
669682
symbol-description: [2]
670-
template-curly-spacing: [2, never]
671-
template-tag-spacing: [2, never]
672683
unicode-bom: [2, never]
673684
unicorn/better-regex: [0]
674685
unicorn/catch-error-name: [0]
@@ -807,7 +818,4 @@ rules:
807818
wc/no-typos: [2]
808819
wc/require-listener-teardown: [2]
809820
wc/tag-name-matches-class: [2]
810-
wrap-iife: [2, inside]
811-
wrap-regex: [0]
812-
yield-star-spacing: [2, after]
813821
yoda: [2, never]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ update-js: node-check | node_modules
892892
update-py: node-check | node_modules
893893
npx updates -u -f pyproject.toml
894894
rm -rf .venv poetry.lock
895-
poetry install
895+
poetry install --no-root
896896
@touch .venv
897897

898898
.PHONY: fomantic

contrib/environment-to-ini/environment-to-ini.go

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,28 @@ func main() {
4747
on the configuration cheat sheet.`
4848
app.Flags = []cli.Flag{
4949
&cli.StringFlag{
50-
Name: "custom-path, C",
51-
Value: setting.CustomPath,
52-
Usage: "Custom path file path",
50+
Name: "custom-path",
51+
Aliases: []string{"C"},
52+
Value: setting.CustomPath,
53+
Usage: "Custom path file path",
5354
},
5455
&cli.StringFlag{
55-
Name: "config, c",
56-
Value: setting.CustomConf,
57-
Usage: "Custom configuration file path",
56+
Name: "config",
57+
Aliases: []string{"c"},
58+
Value: setting.CustomConf,
59+
Usage: "Custom configuration file path",
5860
},
5961
&cli.StringFlag{
60-
Name: "work-path, w",
61-
Value: setting.AppWorkPath,
62-
Usage: "Set the gitea working path",
62+
Name: "work-path",
63+
Aliases: []string{"w"},
64+
Value: setting.AppWorkPath,
65+
Usage: "Set the gitea working path",
6366
},
6467
&cli.StringFlag{
65-
Name: "out, o",
66-
Value: "",
67-
Usage: "Destination file to write to",
68+
Name: "out",
69+
Aliases: []string{"o"},
70+
Value: "",
71+
Usage: "Destination file to write to",
6872
},
6973
}
7074
app.Action = runEnvironmentToIni

docs/content/usage/actions/comparison.en-us.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -130,34 +130,3 @@ More details about the `[actions].DEFAULT_ACTIONS_URL` configuration can be foun
130130

131131
Context availability is not checked, so you can use the env context on more places.
132132
See [Context availability](https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability).
133-
134-
## Known issues
135-
136-
### `docker/build-push-action@v4`
137-
138-
See [act_runner#119](https://gitea.com/gitea/act_runner/issues/119#issuecomment-738294).
139-
140-
`ACTIONS_RUNTIME_TOKEN` is a random string in Gitea Actions, not a JWT.
141-
But the `docker/build-push-action@v4` tries to parse the token as JWT and doesn't handle the error, so the job fails.
142-
143-
There are two workarounds:
144-
145-
Set the `ACTIONS_RUNTIME_TOKEN` to empty manually, like:
146-
147-
``` yml
148-
- name: Build and push
149-
uses: docker/build-push-action@v4
150-
env:
151-
ACTIONS_RUNTIME_TOKEN: ''
152-
with:
153-
...
154-
```
155-
156-
The bug has been fixed in a newer [commit](https://gitea.com/docker/build-push-action/commit/d8823bfaed2a82c6f5d4799a2f8e86173c461aba?style=split&whitespace=show-all#diff-1af9a5bdf96ddff3a2f3427ed520b7005e9564ad), but it has not been released. So you could use the latest version by specifying the branch name, like:
157-
158-
``` yml
159-
- name: Build and push
160-
uses: docker/build-push-action@master
161-
with:
162-
...
163-
```

docs/content/usage/actions/comparison.zh-cn.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -132,34 +132,3 @@ Gitea Actions目前不支持此功能。
132132

133133
不检查上下文可用性,因此您可以在更多地方使用env上下文。
134134
请参阅[上下文可用性](https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability)
135-
136-
## 已知问题
137-
138-
### `docker/build-push-action@v4`
139-
140-
请参阅[act_runner#119](https://gitea.com/gitea/act_runner/issues/119#issuecomment-738294)
141-
142-
`ACTIONS_RUNTIME_TOKEN`在Gitea Actions中是一个随机字符串,而不是JWT。
143-
但是`DOCKER/BUILD-PUSH-ACTION@V4尝试将令牌解析为JWT,并且不处理错误,因此Job失败。
144-
145-
有两种解决方法:
146-
147-
手动将`ACTIONS_RUNTIME_TOKEN`设置为空字符串,例如:
148-
149-
``` yml
150-
- name: Build and push
151-
uses: docker/build-push-action@v4
152-
env:
153-
ACTIONS_RUNTIME_TOKEN: ''
154-
with:
155-
...
156-
```
157-
158-
该问题已在较新的[提交](https://gitea.com/docker/build-push-action/commit/d8823bfaed2a82c6f5d4799a2f8e86173c461aba?style=split&whitespace=show-all#diff-1af9a5bdf96ddff3a2f3427ed520b7005e9564ad)中修复,但尚未发布。因此,您可以通过指定分支名称来使用最新版本,例如:
159-
160-
``` yml
161-
- name: Build and push
162-
uses: docker/build-push-action@master
163-
with:
164-
...
165-
```

0 commit comments

Comments
 (0)