Skip to content

Commit 5965a87

Browse files
authored
Merge branch 'main' into radius-full
2 parents 0d1f670 + 8218b64 commit 5965a87

Some content is hidden

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

42 files changed

+2794
-990
lines changed

.eslintrc.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,21 @@ rules:
127127
"@stylistic/js/computed-property-spacing": [2, never]
128128
"@stylistic/js/dot-location": [2, property]
129129
"@stylistic/js/eol-last": [2]
130-
"@stylistic/js/function-call-spacing": [2, never]
131130
"@stylistic/js/function-call-argument-newline": [0]
131+
"@stylistic/js/function-call-spacing": [2, never]
132132
"@stylistic/js/function-paren-newline": [0]
133133
"@stylistic/js/generator-star-spacing": [0]
134134
"@stylistic/js/implicit-arrow-linebreak": [0]
135135
"@stylistic/js/indent": [2, 2, {ignoreComments: true, SwitchCase: 1}]
136136
"@stylistic/js/key-spacing": [2]
137137
"@stylistic/js/keyword-spacing": [2]
138+
"@stylistic/js/line-comment-position": [0]
138139
"@stylistic/js/linebreak-style": [2, unix]
139140
"@stylistic/js/lines-around-comment": [0]
140141
"@stylistic/js/lines-between-class-members": [0]
141142
"@stylistic/js/max-len": [0]
142143
"@stylistic/js/max-statements-per-line": [0]
144+
"@stylistic/js/multiline-comment-style": [0]
143145
"@stylistic/js/multiline-ternary": [0]
144146
"@stylistic/js/new-parens": [2]
145147
"@stylistic/js/newline-per-chained-call": [0]
@@ -705,6 +707,7 @@ rules:
705707
unicorn/better-regex: [0]
706708
unicorn/catch-error-name: [0]
707709
unicorn/consistent-destructuring: [2]
710+
unicorn/consistent-empty-array-spread: [2]
708711
unicorn/consistent-function-scoping: [2]
709712
unicorn/custom-error-definition: [0]
710713
unicorn/empty-brace-spaces: [2]
@@ -731,9 +734,11 @@ rules:
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]
@@ -799,10 +804,12 @@ rules:
799804
unicorn/prefer-set-has: [0]
800805
unicorn/prefer-set-size: [2]
801806
unicorn/prefer-spread: [0]
807+
unicorn/prefer-string-raw: [0]
802808
unicorn/prefer-string-replace-all: [0]
803809
unicorn/prefer-string-slice: [0]
804810
unicorn/prefer-string-starts-ends-with: [2]
805811
unicorn/prefer-string-trim-start-end: [2]
812+
unicorn/prefer-structured-clone: [2]
806813
unicorn/prefer-switch: [0]
807814
unicorn/prefer-ternary: [0]
808815
unicorn/prefer-text-content: [2]

docs/content/usage/packages/npm.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The following examples use the `npm` tool with the scope `@test`.
3030
To register the package registry you need to configure a new package source.
3131

3232
```shell
33-
npm config set {scope}:registry https://gitea.example.com/api/packages/{owner}/npm/
33+
npm config set {scope}:registry=https://gitea.example.com/api/packages/{owner}/npm/
3434
npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{token}"
3535
```
3636

@@ -43,7 +43,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t
4343
For example:
4444

4545
```shell
46-
npm config set @test:registry https://gitea.example.com/api/packages/testuser/npm/
46+
npm config set @test:registry=https://gitea.example.com/api/packages/testuser/npm/
4747
npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token"
4848
```
4949

docs/content/usage/packages/npm.zh-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ menu:
3030
要注册软件包注册表,您需要配置一个新的软件包源。
3131

3232
```shell
33-
npm config set {scope}:registry https://gitea.example.com/api/packages/{owner}/npm/
33+
npm config set {scope}:registry=https://gitea.example.com/api/packages/{owner}/npm/
3434
npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{token}"
3535
```
3636

@@ -43,7 +43,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t
4343
例如:
4444

4545
```shell
46-
npm config set @test:registry https://gitea.example.com/api/packages/testuser/npm/
46+
npm config set @test:registry=https://gitea.example.com/api/packages/testuser/npm/
4747
npm config set -- '//gitea.example.com/api/packages/testuser/npm/:_authToken' "personal_access_token"
4848
```
4949

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
-
22
id: 1
3+
user_id: 1
4+
pull_id: 1
35
commit_sha: 19fe5caf872476db265596eaac1dc35ad1c6422d

models/migrations/v1_22/v286.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ func expandHashReferencesToSha256(x *xorm.Engine) error {
3636
if setting.Database.Type.IsMSSQL() {
3737
// drop indexes that need to be re-created afterwards
3838
droppedIndexes := []string{
39-
"DROP INDEX IF EXISTS [IDX_commit_status_context_hash] ON [commit_status]",
40-
"DROP INDEX IF EXISTS [UQE_review_state_pull_commit_user] ON [review_state]",
41-
"DROP INDEX IF EXISTS [UQE_repo_archiver_s] ON [repo_archiver]",
39+
"DROP INDEX [IDX_commit_status_context_hash] ON [commit_status]",
40+
"DROP INDEX [UQE_review_state_pull_commit_user] ON [review_state]",
41+
"DROP INDEX [UQE_repo_archiver_s] ON [repo_archiver]",
4242
}
4343
for _, s := range droppedIndexes {
4444
_, err := db.Exec(s)

models/migrations/v1_22/v286_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ func PrepareOldRepository(t *testing.T) (*xorm.Engine, func()) {
1919

2020
type CommitStatus struct {
2121
ID int64
22-
ContextHash string
22+
ContextHash string `xorm:"char(40) index"`
2323
}
2424

2525
type RepoArchiver struct {
2626
ID int64
27-
RepoID int64
28-
Type int
29-
CommitID string
27+
RepoID int64 `xorm:"index unique(s)"`
28+
Type int `xorm:"unique(s)"`
29+
CommitID string `xorm:"VARCHAR(40) unique(s)"`
3030
}
3131

3232
type ReviewState struct {
3333
ID int64
34-
CommitSHA string
35-
UserID int64
36-
PullID int64
34+
UserID int64 `xorm:"NOT NULL UNIQUE(pull_commit_user)"`
35+
PullID int64 `xorm:"NOT NULL INDEX UNIQUE(pull_commit_user) DEFAULT 0"`
36+
CommitSHA string `xorm:"NOT NULL VARCHAR(40) UNIQUE(pull_commit_user)"`
3737
}
3838

3939
type Comment struct {

modules/structs/issue_label.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ type EditLabelOption struct {
4747

4848
// IssueLabelsOption a collection of labels
4949
type IssueLabelsOption struct {
50-
// list of label IDs
51-
Labels []int64 `json:"labels"`
50+
// Labels can be a list of integers representing label IDs
51+
// or a list of strings representing label names
52+
Labels []any `json:"labels"`
5253
}
5354

5455
// LabelTemplate info of a Label template

options/gitignore/Go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919

2020
# Go workspace file
2121
go.work
22+
go.work.sum

options/gitignore/Python

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ ipython_config.py
106106
#pdm.lock
107107
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108108
# in version control.
109-
# https://pdm.fming.dev/#use-with-ide
109+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110110
.pdm.toml
111+
.pdm-python
112+
.pdm-build/
111113

112114
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113115
__pypackages__/

0 commit comments

Comments
 (0)