Skip to content

Commit e2cd24e

Browse files
authored
Merge branch 'main' into lunny/fix_get_reviewers_bug
2 parents 7e073ec + 249e676 commit e2cd24e

Some content is hidden

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

69 files changed

+636
-478
lines changed

.github/workflows/pull-compliance.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
python-version: "3.12"
3838
- uses: actions/setup-node@v4
3939
with:
40-
node-version: 20
40+
node-version: 22
4141
cache: npm
4242
cache-dependency-path: package-lock.json
4343
- run: pip install poetry
@@ -66,7 +66,7 @@ jobs:
6666
- uses: actions/checkout@v4
6767
- uses: actions/setup-node@v4
6868
with:
69-
node-version: 20
69+
node-version: 22
7070
cache: npm
7171
cache-dependency-path: package-lock.json
7272
- run: make deps-frontend
@@ -137,7 +137,7 @@ jobs:
137137
- uses: actions/checkout@v4
138138
- uses: actions/setup-node@v4
139139
with:
140-
node-version: 20
140+
node-version: 22
141141
cache: npm
142142
cache-dependency-path: package-lock.json
143143
- run: make deps-frontend
@@ -186,7 +186,7 @@ jobs:
186186
- uses: actions/checkout@v4
187187
- uses: actions/setup-node@v4
188188
with:
189-
node-version: 20
189+
node-version: 22
190190
cache: npm
191191
cache-dependency-path: package-lock.json
192192
- run: make deps-frontend

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
check-latest: true
2424
- uses: actions/setup-node@v4
2525
with:
26-
node-version: 20
26+
node-version: 22
2727
cache: npm
2828
cache-dependency-path: package-lock.json
2929
- run: make deps-frontend frontend deps-backend

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
check-latest: true
2323
- uses: actions/setup-node@v4
2424
with:
25-
node-version: 20
25+
node-version: 22
2626
cache: npm
2727
cache-dependency-path: package-lock.json
2828
- run: make deps-frontend deps-backend

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
check-latest: true
2424
- uses: actions/setup-node@v4
2525
with:
26-
node-version: 20
26+
node-version: 22
2727
cache: npm
2828
cache-dependency-path: package-lock.json
2929
- run: make deps-frontend deps-backend

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
check-latest: true
2626
- uses: actions/setup-node@v4
2727
with:
28-
node-version: 20
28+
node-version: 22
2929
cache: npm
3030
cache-dependency-path: package-lock.json
3131
- run: make deps-frontend deps-backend

flake.lock

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

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
gzip
2323

2424
# frontend
25-
nodejs_20
25+
nodejs_22
2626

2727
# linting
2828
python312

models/actions/run.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ func CancelPreviousJobs(ctx context.Context, repoID int64, ref, workflowID strin
261261
}
262262

263263
// InsertRun inserts a run
264+
// The title will be cut off at 255 characters if it's longer than 255 characters.
264265
func InsertRun(ctx context.Context, run *ActionRun, jobs []*jobparser.SingleWorkflow) error {
265266
ctx, committer, err := db.TxContext(ctx)
266267
if err != nil {
@@ -273,6 +274,7 @@ func InsertRun(ctx context.Context, run *ActionRun, jobs []*jobparser.SingleWork
273274
return err
274275
}
275276
run.Index = index
277+
run.Title, _ = util.SplitStringAtByteN(run.Title, 255)
276278

277279
if err := db.Insert(ctx, run); err != nil {
278280
return err
@@ -399,6 +401,7 @@ func UpdateRun(ctx context.Context, run *ActionRun, cols ...string) error {
399401
if len(cols) > 0 {
400402
sess.Cols(cols...)
401403
}
404+
run.Title, _ = util.SplitStringAtByteN(run.Title, 255)
402405
affected, err := sess.Update(run)
403406
if err != nil {
404407
return err

models/actions/runner.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ func GetRunnerByID(ctx context.Context, id int64) (*ActionRunner, error) {
252252
// UpdateRunner updates runner's information.
253253
func UpdateRunner(ctx context.Context, r *ActionRunner, cols ...string) error {
254254
e := db.GetEngine(ctx)
255+
r.Name, _ = util.SplitStringAtByteN(r.Name, 255)
255256
var err error
256257
if len(cols) == 0 {
257258
_, err = e.ID(r.ID).AllCols().Update(r)
@@ -278,6 +279,7 @@ func CreateRunner(ctx context.Context, t *ActionRunner) error {
278279
// Remove OwnerID to avoid confusion; it's not worth returning an error here.
279280
t.OwnerID = 0
280281
}
282+
t.Name, _ = util.SplitStringAtByteN(t.Name, 255)
281283
return db.Insert(ctx, t)
282284
}
283285

models/actions/schedule.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
repo_model "code.gitea.io/gitea/models/repo"
1313
user_model "code.gitea.io/gitea/models/user"
1414
"code.gitea.io/gitea/modules/timeutil"
15+
"code.gitea.io/gitea/modules/util"
1516
webhook_module "code.gitea.io/gitea/modules/webhook"
1617
)
1718

@@ -67,6 +68,7 @@ func CreateScheduleTask(ctx context.Context, rows []*ActionSchedule) error {
6768

6869
// Loop through each schedule row
6970
for _, row := range rows {
71+
row.Title, _ = util.SplitStringAtByteN(row.Title, 255)
7072
// Create new schedule row
7173
if err = db.Insert(ctx, row); err != nil {
7274
return err

0 commit comments

Comments
 (0)