Skip to content

Commit 9575dec

Browse files
authored
Merge branch 'main' into label_delete_event_fix
2 parents bbbe98c + 7a474d1 commit 9575dec

Some content is hidden

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

46 files changed

+224
-172
lines changed

.github/workflows/pull-compliance.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ jobs:
3535
- uses: astral-sh/setup-uv@v6
3636
- run: uv python install 3.12
3737
- uses: pnpm/action-setup@v4
38-
- uses: actions/setup-node@v4
38+
- uses: actions/setup-node@v5
3939
with:
4040
node-version: 24
41-
cache: pnpm
42-
cache-dependency-path: pnpm-lock.yaml
4341
- run: make deps-py
4442
- run: make deps-frontend
4543
- run: make lint-templates
@@ -62,11 +60,9 @@ jobs:
6260
steps:
6361
- uses: actions/checkout@v4
6462
- uses: pnpm/action-setup@v4
65-
- uses: actions/setup-node@v4
63+
- uses: actions/setup-node@v5
6664
with:
6765
node-version: 24
68-
cache: pnpm
69-
cache-dependency-path: pnpm-lock.yaml
7066
- run: make deps-frontend
7167
- run: make lint-swagger
7268

@@ -134,11 +130,9 @@ jobs:
134130
steps:
135131
- uses: actions/checkout@v4
136132
- uses: pnpm/action-setup@v4
137-
- uses: actions/setup-node@v4
133+
- uses: actions/setup-node@v5
138134
with:
139135
node-version: 24
140-
cache: pnpm
141-
cache-dependency-path: pnpm-lock.yaml
142136
- run: make deps-frontend
143137
- run: make lint-frontend
144138
- run: make checks-frontend
@@ -184,11 +178,9 @@ jobs:
184178
steps:
185179
- uses: actions/checkout@v4
186180
- uses: pnpm/action-setup@v4
187-
- uses: actions/setup-node@v4
181+
- uses: actions/setup-node@v5
188182
with:
189183
node-version: 24
190-
cache: pnpm
191-
cache-dependency-path: pnpm-lock.yaml
192184
- run: make deps-frontend
193185
- run: make lint-md
194186

.github/workflows/pull-e2e-tests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ jobs:
2424
go-version-file: go.mod
2525
check-latest: true
2626
- uses: pnpm/action-setup@v4
27-
- uses: actions/setup-node@v4
27+
- uses: actions/setup-node@v5
2828
with:
2929
node-version: 24
30-
cache: pnpm
31-
cache-dependency-path: pnpm-lock.yaml
3230
- run: make deps-frontend frontend deps-backend
3331
- run: pnpm exec playwright install --with-deps
3432
- run: make test-e2e-sqlite

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ jobs:
2121
go-version-file: go.mod
2222
check-latest: true
2323
- uses: pnpm/action-setup@v4
24-
- uses: actions/setup-node@v4
24+
- uses: actions/setup-node@v5
2525
with:
2626
node-version: 24
27-
cache: pnpm
28-
cache-dependency-path: pnpm-lock.yaml
2927
- run: make deps-frontend deps-backend
3028
# xgo build
3129
- run: make release

.github/workflows/release-tag-rc.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ jobs:
2222
go-version-file: go.mod
2323
check-latest: true
2424
- uses: pnpm/action-setup@v4
25-
- uses: actions/setup-node@v4
25+
- uses: actions/setup-node@v5
2626
with:
2727
node-version: 24
28-
cache: pnpm
29-
cache-dependency-path: pnpm-lock.yaml
3028
- run: make deps-frontend deps-backend
3129
# xgo build
3230
- run: make release

.github/workflows/release-tag-version.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ jobs:
2626
go-version-file: go.mod
2727
check-latest: true
2828
- uses: pnpm/action-setup@v4
29-
- uses: actions/setup-node@v4
29+
- uses: actions/setup-node@v5
3030
with:
3131
node-version: 24
32-
cache: pnpm
33-
cache-dependency-path: pnpm-lock.yaml
3432
- run: make deps-frontend deps-backend
3533
# xgo build
3634
- run: make release

cmd/dump.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ func runDump(ctx context.Context, cmd *cli.Command) error {
265265
excludes = append(excludes, setting.LFS.Storage.Path)
266266
excludes = append(excludes, setting.Attachment.Storage.Path)
267267
excludes = append(excludes, setting.Packages.Storage.Path)
268+
excludes = append(excludes, setting.RepoArchive.Storage.Path)
268269
excludes = append(excludes, setting.Log.RootPath)
269270
if err := dumper.AddRecursiveExclude("data", setting.AppDataPath, excludes); err != nil {
270271
fatal("Failed to include data directory: %v", err)

models/asymkey/gpg_key_commit_verification.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type CommitVerification struct {
2525
SigningUser *user_model.User // if Verified, then SigningUser is non-nil
2626
CommittingUser *user_model.User // if Verified, then CommittingUser is non-nil
2727
SigningEmail string
28-
SigningKey *GPGKey
28+
SigningKey *GPGKey // FIXME: need to refactor it to a new name like "SigningGPGKey", it is also used in some templates
2929
SigningSSHKey *PublicKey
3030
TrustStatus string
3131
}

models/asymkey/key_display.go

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright 2025 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
4+
package asymkey
5+
6+
import (
7+
"os"
8+
9+
"code.gitea.io/gitea/modules/git"
10+
"code.gitea.io/gitea/modules/log"
11+
"code.gitea.io/gitea/modules/setting"
12+
)
13+
14+
func GetDisplaySigningKey(key *git.SigningKey) string {
15+
if key == nil || key.Format == "" {
16+
return ""
17+
}
18+
19+
switch key.Format {
20+
case git.SigningKeyFormatOpenPGP:
21+
return key.KeyID
22+
case git.SigningKeyFormatSSH:
23+
content, err := os.ReadFile(key.KeyID)
24+
if err != nil {
25+
log.Error("Unable to read SSH key %s: %v", key.KeyID, err)
26+
return "(Unable to read SSH key)"
27+
}
28+
display, err := CalcFingerprint(string(content))
29+
if err != nil {
30+
log.Error("Unable to calculate fingerprint for SSH key %s: %v", key.KeyID, err)
31+
return "(Unable to calculate fingerprint for SSH key)"
32+
}
33+
return display
34+
}
35+
setting.PanicInDevOrTesting("Unknown signing key format: %s", key.Format)
36+
return "(Unknown key format)"
37+
}

models/issues/comment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ type Comment struct {
279279
DependentIssue *Issue `xorm:"-"`
280280

281281
CommitID int64
282-
Line int64 // - previous line / + proposed line
283-
TreePath string
282+
Line int64 // - previous line / + proposed line
283+
TreePath string `xorm:"VARCHAR(4000)"` // SQLServer only supports up to 4000
284284
Content string `xorm:"LONGTEXT"`
285285
ContentVersion int `xorm:"NOT NULL DEFAULT 0"`
286286
RenderedContent template.HTML `xorm:"-"`

models/migrations/migrations.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ func prepareMigrationTasks() []*migration {
393393

394394
// Gitea 1.24.0 ends at database version 321
395395
newMigration(321, "Use LONGTEXT for some columns and fix review_state.updated_files column", v1_25.UseLongTextInSomeColumnsAndFixBugs),
396+
newMigration(322, "Extend comment tree_path length limit", v1_25.ExtendCommentTreePathLength),
396397
}
397398
return preparedMigrations
398399
}

0 commit comments

Comments
 (0)