Skip to content

Commit ad89474

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: [skip ci] Updated licenses and gitignores Fix file path width in repo non-homepage view (go-gitea#30951) Enable `declaration-block-no-redundant-longhand-properties` (go-gitea#30950) [skip ci] Updated translations via Crowdin Move reverproxyauth before session so the header will not be ignored even if user has login (go-gitea#27821) Use CSS `inset` shorthand (go-gitea#30939) Remove If Exist check on migration for mssql because that syntax required SQL server 2016 (go-gitea#30894) Update JS dependencies, add new eslint rules (go-gitea#30840) Fix some UI regressions for commit list (go-gitea#30920) Forbid deprecated `break-word` in CSS (go-gitea#30934) Check if reverse proxy is correctly configured (go-gitea#30890) Remove deprecated stuff for runners (go-gitea#30930)
2 parents 4efb04e + 2442ead commit ad89474

Some content is hidden

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

50 files changed

+2804
-1021
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]
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 {

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__/

options/license/CC-BY-3.0

Lines changed: 298 additions & 72 deletions
Large diffs are not rendered by default.

options/license/CC-BY-NC-3.0

Lines changed: 313 additions & 74 deletions
Large diffs are not rendered by default.

options/license/CC-BY-NC-ND-3.0

Lines changed: 287 additions & 68 deletions
Large diffs are not rendered by default.

options/license/CC-BY-NC-SA-3.0

Lines changed: 339 additions & 78 deletions
Large diffs are not rendered by default.

options/license/CC-BY-ND-3.0

Lines changed: 272 additions & 66 deletions
Large diffs are not rendered by default.

options/license/CC-BY-SA-3.0

Lines changed: 338 additions & 78 deletions
Large diffs are not rendered by default.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Disclaimer:
2+
3+
The software is provided "as is", without warranty of any kind,
4+
express or implied, including but not limited to the warranties
5+
of merchantability, fitness for a particular purpose and
6+
noninfringement. In no event shall the author(s) be liable for
7+
any claim, damages or other liability, whether in an action of
8+
contract, tort or otherwise, arising from, out of or in connection
9+
with the software or the use or other dealings in the software.
10+
11+
Permission to use, copy, modify, distribute, and sell this
12+
software and its documentation for any purpose is hereby
13+
granted without fee, provided that the above copyright notice
14+
appear in all copies and that both that copyright notice and
15+
this permission notice appear in supporting documentation.

options/license/LGPL-2.0-only

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The precise terms and conditions for copying, distribution and modification foll
3939

4040
Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one.
4141

42+
GNU LIBRARY GENERAL PUBLIC LICENSE
4243
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
4344

4445
0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you".

options/license/LGPL-2.0-or-later

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The precise terms and conditions for copying, distribution and modification foll
3939

4040
Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one.
4141

42+
GNU LIBRARY GENERAL PUBLIC LICENSE
4243
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
4344

4445
0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you".

options/license/LGPL-2.1-only

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Although the Lesser General Public License is Less protective of the users' free
4141

4242
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
4343

44+
GNU LESSER GENERAL PUBLIC LICENSE
4445
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
4546

4647
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".

options/license/LGPL-2.1-or-later

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Although the Lesser General Public License is Less protective of the users' free
4141

4242
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
4343

44+
GNU LESSER GENERAL PUBLIC LICENSE
4445
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
4546

4647
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".

options/license/PCRE2-exception

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
EXEMPTION FOR BINARY LIBRARY-LIKE PACKAGES
2+
------------------------------------------
3+
4+
The second condition in the BSD licence (covering binary redistributions) does
5+
not apply all the way down a chain of software. If binary package A includes
6+
PCRE2, it must respect the condition, but if package B is software that
7+
includes package A, the condition is not imposed on package B unless it uses
8+
PCRE2 independently.

0 commit comments

Comments
 (0)