Skip to content

Commit fe525f2

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: [skip ci] Updated translations via Crowdin Update Nix flake (go-gitea#36902) Migrate fomantic `search` and `modal` CSS to first-party modules (go-gitea#36869) Feature: Add per-runner “Disable/Pause” (go-gitea#36776) Enable native dark mode for swagger-ui (go-gitea#36899) Front port changelog for 1.25.5 (go-gitea#36892) Fix typos in code comments: doesnt, dont, wont (go-gitea#36890) Vendor relative-time-element as local web component (go-gitea#36853)
2 parents e3bc622 + d6496c6 commit fe525f2

60 files changed

Lines changed: 2040 additions & 1414 deletions

Some content is hidden

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

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,53 @@ This changelog goes through the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.com).
66

7+
## [1.25.5](https://github.com/go-gitea/gitea/releases/tag/v1.25.5) - 2026-03-10
8+
9+
* SECURITY
10+
* Toolchain Update to Go 1.25.6 (#36480) (#36487)
11+
* Adjust the toolchain version (#36537) (#36542)
12+
* Update toolchain to 1.25.8 for v1.25 (#36888)
13+
* Prevent redirect bypasses via backslash-encoded paths (#36660) (#36716)
14+
* Fix get release draft permission check (#36659) (#36715)
15+
* Fix a bug user could change another user's primary email (#36586) (#36607)
16+
* Fix OAuth2 authorization code expiry and reuse handling (#36797) (#36851)
17+
* Add validation constraints for repository creation fields (#36671) (#36757)
18+
* Fix bug to check whether user can update pull request branch or rebase branch (#36465) (#36838)
19+
* Add migration http transport for push/sync mirror lfs (#36665) (#36691)
20+
* Fix track time list permission check (#36662) (#36744)
21+
* Fix track time issue id (#36664) (#36689)
22+
* Fix path resolving (#36734) (#36746)
23+
* Fix dump release asset bug (#36799) (#36839)
24+
* Fix org permission API visibility checks for hidden members and private orgs (#36798) (#36841)
25+
* Fix forwarded proto handling for public URL detection (#36810) (#36836)
26+
* Add a git grep search timeout (#36809) (#36835)
27+
* Fix oauth2 s256 (#36462) (#36477)
28+
* ENHANCEMENTS
29+
* Make `security-check` informational only (#36681) (#36852)
30+
* Upgrade to github.com/cloudflare/circl 1.6.3, svgo 4.0.1, markdownlint-cli 0.48.0 (#36840)
31+
* Add some validation on values provided to USER_DISABLED_FEATURES and EXTERNAL_USER_DISABLED_FEATURES (#36688) (#36692)
32+
* Upgrade gogit to 5.16.5 (#36687)
33+
* Add wrap to runner label list (#36565) (#36574)
34+
* Add dnf5 command for Fedora in RPM package instructions (#36527) (#36572)
35+
* Allow scroll propagation outside code editor (#36502) (#36510)
36+
* BUGFIXES
37+
* Fix non-admins unable to automerge PRs from forks (#36833) (#36843)
38+
* Fix bug when pushing mirror with wiki (#36795) (#36807)
39+
* Fix artifacts v4 backend upload problems (#36805) (#36834)
40+
* Fix CRAN package version validation to allow more than 4 version components (#36813) (#36821)
41+
* Fix force push time-line commit comments of pull request (#36653) (#36717)
42+
* Fix SVG height calculation in diff viewer (#36748) (#36750)
43+
* Fix push time bug (#36693) (#36713)
44+
* Fix bug the protected branch rule name is conflicted with renamed branch name (#36650) (#36661)
45+
* Fix bug when do LFS GC (#36500) (#36608)
46+
* Fix focus lost bugs in the Monaco editor (#36609)
47+
* Reprocess htmx content after loading more files (#36568) (#36577)
48+
* Fix assignee sidebar links and empty placeholder (#36559) (#36563)
49+
* Fix issues filter dropdown showing empty label scope section (#36535) (#36544)
50+
* Fix various mermaid bugs (#36547) (#36552)
51+
* Fix data race when uploading container blobs concurrently (#36524) (#36526)
52+
* Correct spacing between username and bot label (#36473) (#36484)
53+
754
## [1.25.4](https://github.com/go-gitea/gitea/releases/tag/v1.25.4) - 2026-01-15
855

956
* SECURITY

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.

models/actions/runner.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ type ActionRunner struct {
6262
AgentLabels []string `xorm:"TEXT"`
6363
// Store if this is a runner that only ever get one single job assigned
6464
Ephemeral bool `xorm:"ephemeral NOT NULL DEFAULT false"`
65+
// Store if this runner is disabled and should not pick up new jobs
66+
IsDisabled bool `xorm:"is_disabled NOT NULL DEFAULT false"`
6567

6668
Created timeutil.TimeStamp `xorm:"created"`
6769
Updated timeutil.TimeStamp `xorm:"updated"`
@@ -199,6 +201,7 @@ type FindRunnerOptions struct {
199201
Sort string
200202
Filter string
201203
IsOnline optional.Option[bool]
204+
IsDisabled optional.Option[bool]
202205
WithAvailable bool // not only runners belong to, but also runners can be used
203206
}
204207

@@ -239,6 +242,10 @@ func (opts FindRunnerOptions) ToConds() builder.Cond {
239242
cond = cond.And(builder.Lte{"last_online": time.Now().Add(-RunnerOfflineTime).Unix()})
240243
}
241244
}
245+
246+
if opts.IsDisabled.Has() {
247+
cond = cond.And(builder.Eq{"is_disabled": opts.IsDisabled.Value()})
248+
}
242249
return cond
243250
}
244251

@@ -297,6 +304,20 @@ func UpdateRunner(ctx context.Context, r *ActionRunner, cols ...string) error {
297304
return err
298305
}
299306

307+
func SetRunnerDisabled(ctx context.Context, runner *ActionRunner, isDisabled bool) error {
308+
if runner.IsDisabled == isDisabled {
309+
return nil
310+
}
311+
312+
return db.WithTx(ctx, func(ctx context.Context) error {
313+
runner.IsDisabled = isDisabled
314+
if err := UpdateRunner(ctx, runner, "is_disabled"); err != nil {
315+
return err
316+
}
317+
return IncreaseTaskVersion(ctx, runner.OwnerID, runner.RepoID)
318+
})
319+
}
320+
300321
// DeleteRunner deletes a runner by given ID.
301322
func DeleteRunner(ctx context.Context, id int64) error {
302323
if _, err := GetRunnerByID(ctx, id); err != nil {

models/activities/notification_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func createOrUpdateIssueNotifications(ctx context.Context, issueID, commentID, n
113113
}
114114
toNotify.AddMultiple(issueParticipants...)
115115

116-
// dont notify user who cause notification
116+
// don't notify user who cause notification
117117
delete(toNotify, notificationAuthorID)
118118
// explicit unwatch on issue
119119
issueUnWatches, err := issues_model.GetIssueWatchersIDs(ctx, issueID, false)

models/issues/label_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func TestGetLabelsByIssueID(t *testing.T) {
254254
func TestUpdateLabel(t *testing.T) {
255255
assert.NoError(t, unittest.PrepareTestDatabase())
256256
label := unittest.AssertExistsAndLoadBean(t, &issues_model.Label{ID: 1})
257-
// make sure update wont overwrite it
257+
// make sure update won't overwrite it
258258
update := &issues_model.Label{
259259
ID: label.ID,
260260
Color: "#ffff00",

models/migrations/migrations.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ func prepareMigrationTasks() []*migration {
401401
newMigration(324, "Fix closed milestone completeness for milestones with no issues", v1_26.FixClosedMilestoneCompleteness),
402402
newMigration(325, "Fix missed repo_id when migrate attachments", v1_26.FixMissedRepoIDWhenMigrateAttachments),
403403
newMigration(326, "Migrate commit status target URL to use run ID and job ID", v1_26.FixCommitStatusTargetURLToUseRunAndJobID),
404+
newMigration(327, "Add disabled state to action runners", v1_26.AddDisabledToActionRunner),
404405
}
405406
return preparedMigrations
406407
}

models/migrations/v1_26/v327.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2026 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
4+
package v1_26
5+
6+
import "xorm.io/xorm"
7+
8+
func AddDisabledToActionRunner(x *xorm.Engine) error {
9+
type ActionRunner struct {
10+
IsDisabled bool `xorm:"is_disabled NOT NULL DEFAULT false"`
11+
}
12+
13+
_, err := x.SyncWithOptions(xorm.SyncOptions{
14+
IgnoreDropIndices: true,
15+
}, new(ActionRunner))
16+
return err
17+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Copyright 2026 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
4+
package v1_26
5+
6+
import (
7+
"testing"
8+
9+
"code.gitea.io/gitea/models/migrations/base"
10+
11+
"github.com/stretchr/testify/require"
12+
)
13+
14+
func Test_AddDisabledToActionRunner(t *testing.T) {
15+
type ActionRunner struct {
16+
ID int64 `xorm:"pk autoincr"`
17+
Name string
18+
}
19+
20+
x, deferable := base.PrepareTestEnv(t, 0, new(ActionRunner))
21+
defer deferable()
22+
23+
_, err := x.Insert(&ActionRunner{Name: "runner"})
24+
require.NoError(t, err)
25+
26+
require.NoError(t, AddDisabledToActionRunner(x))
27+
28+
var isDisabled bool
29+
has, err := x.SQL("SELECT is_disabled FROM action_runner WHERE id = ?", 1).Get(&isDisabled)
30+
require.NoError(t, err)
31+
require.True(t, has)
32+
require.False(t, isDisabled)
33+
}

modules/indexer/code/bleve/token/path/path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TokenFilterConstructor(config map[string]any, cache *registry.Cache) (analy
2727

2828
func (s *TokenFilter) Filter(input analysis.TokenStream) analysis.TokenStream {
2929
if len(input) == 1 {
30-
// if there is only one token, we dont need to generate the reversed chain
30+
// if there is only one token, we don't need to generate the reversed chain
3131
return generatePathTokens(input, false)
3232
}
3333

modules/structs/repo_actions.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,18 @@ type ActionRunner struct {
196196
Name string `json:"name"`
197197
Status string `json:"status"`
198198
Busy bool `json:"busy"`
199+
Disabled bool `json:"disabled"`
199200
Ephemeral bool `json:"ephemeral"`
200201
Labels []*ActionRunnerLabel `json:"labels"`
201202
}
202203

204+
// EditActionRunnerOption represents the editable fields for a runner.
205+
// swagger:model
206+
type EditActionRunnerOption struct {
207+
// required: true
208+
Disabled *bool `json:"disabled"`
209+
}
210+
203211
// ActionRunnersResponse returns Runners
204212
type ActionRunnersResponse struct {
205213
Entries []*ActionRunner `json:"runners"`

0 commit comments

Comments
 (0)