Skip to content

Commit df26d62

Browse files
authored
Merge branch 'main' into feature/sort_ascending
2 parents 787438d + 6619b1e commit df26d62

File tree

12 files changed

+540
-390
lines changed

12 files changed

+540
-390
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.24-alpine3.22 AS build-env
2+
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

Dockerfile.rootless

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.24-alpine3.22 AS build-env
2+
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SHASUM ?= shasum -a 256
2323
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
2424
COMMA := ,
2525

26-
XGO_VERSION := go-1.24.x
26+
XGO_VERSION := go-1.25.x
2727

2828
AIR_PACKAGE ?= github.com/air-verse/air@v1
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3

flake.lock

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

flake.nix

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,53 @@
1515
with pkgs;
1616
let
1717
# only bump toolchain versions here
18-
go = go_1_24;
18+
go = go_1_25;
1919
nodejs = nodejs_24;
2020
python3 = python312;
21+
22+
# Platform-specific dependencies
23+
linuxOnlyInputs = lib.optionals pkgs.stdenv.isLinux [
24+
glibc.static
25+
];
26+
27+
linuxOnlyEnv = lib.optionalAttrs pkgs.stdenv.isLinux {
28+
CFLAGS = "-I${glibc.static.dev}/include";
29+
LDFLAGS = "-L ${glibc.static}/lib";
30+
};
2131
in
22-
pkgs.mkShell {
23-
buildInputs = [
24-
# generic
25-
git
26-
git-lfs
27-
gnumake
28-
gnused
29-
gnutar
30-
gzip
32+
pkgs.mkShell (
33+
{
34+
buildInputs = [
35+
# generic
36+
git
37+
git-lfs
38+
gnumake
39+
gnused
40+
gnutar
41+
gzip
3142

32-
# frontend
33-
nodejs
43+
# frontend
44+
nodejs
3445

35-
# linting
36-
python3
37-
uv
46+
# linting
47+
python3
48+
uv
3849

39-
# backend
40-
go
41-
glibc.static
42-
gofumpt
43-
sqlite
44-
];
45-
CFLAGS = "-I${glibc.static.dev}/include";
46-
LDFLAGS = "-L ${glibc.static}/lib";
47-
GO = "${go}/bin/go";
48-
GOROOT = "${go}/share/go";
50+
# backend
51+
go
52+
gofumpt
53+
sqlite
54+
]
55+
++ linuxOnlyInputs;
56+
57+
GO = "${go}/bin/go";
58+
GOROOT = "${go}/share/go";
4959

50-
TAGS = "sqlite sqlite_unlock_notify";
51-
STATIC = "true";
52-
};
60+
TAGS = "sqlite sqlite_unlock_notify";
61+
STATIC = "true";
62+
}
63+
// linuxOnlyEnv
64+
);
5365
}
5466
);
5567
}

options/locale/locale_zh-CN.ini

Lines changed: 314 additions & 234 deletions
Large diffs are not rendered by default.

services/actions/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func CreateAuthorizationToken(taskID, runID, jobID int64) (string, error) {
5353

5454
claims := actionsClaims{
5555
RegisteredClaims: jwt.RegisteredClaims{
56-
ExpiresAt: jwt.NewNumericDate(now.Add(24 * time.Hour)),
56+
ExpiresAt: jwt.NewNumericDate(now.Add(1*time.Hour + setting.Actions.EndlessTaskTimeout)),
5757
NotBefore: jwt.NewNumericDate(now),
5858
},
5959
Scp: fmt.Sprintf("Actions.Results:%d:%d", runID, jobID),

services/asymkey/sign.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,16 +290,22 @@ Loop:
290290
return false, nil, nil, err
291291
}
292292
defer gitRepo.Close()
293-
commit, err := gitRepo.GetCommit(parentCommit)
293+
isEmpty, err := gitRepo.IsEmpty()
294294
if err != nil {
295295
return false, nil, nil, err
296296
}
297-
if commit.Signature == nil {
298-
return false, nil, nil, &ErrWontSign{parentSigned}
299-
}
300-
verification := ParseCommitWithSignature(ctx, commit)
301-
if !verification.Verified {
302-
return false, nil, nil, &ErrWontSign{parentSigned}
297+
if !isEmpty {
298+
commit, err := gitRepo.GetCommit(parentCommit)
299+
if err != nil {
300+
return false, nil, nil, err
301+
}
302+
if commit.Signature == nil {
303+
return false, nil, nil, &ErrWontSign{parentSigned}
304+
}
305+
verification := ParseCommitWithSignature(ctx, commit)
306+
if !verification.Verified {
307+
return false, nil, nil, &ErrWontSign{parentSigned}
308+
}
303309
}
304310
}
305311
}

services/lfs/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func DownloadHandler(ctx *context.Context) {
114114
}
115115
}
116116

117-
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size-fromByte))
117+
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size))
118118
ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Range")
119119
}
120120
}

services/migrations/github.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ func (g *GithubDownloaderV3) convertGithubRelease(ctx context.Context, rel *gith
354354

355355
// Prevent open redirect
356356
if !hasBaseURL(redirectURL, g.baseURL) &&
357-
!hasBaseURL(redirectURL, "https://objects.githubusercontent.com/") {
357+
!hasBaseURL(redirectURL, "https://objects.githubusercontent.com/") &&
358+
!hasBaseURL(redirectURL, "https://release-assets.githubusercontent.com/") {
358359
WarnAndNotice("Unexpected AssetURL for assetID[%d] in %s: %s", asset.GetID(), g, redirectURL)
359360

360361
return io.NopCloser(strings.NewReader(redirectURL)), nil

0 commit comments

Comments
 (0)