Skip to content

Commit 1be56f1

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: (34 commits) Refactor URL detection (go-gitea#29960) Solving the issue of UI disruption when the review is deleted without refreshing (go-gitea#29951) Fix JS error and improve error message styles (go-gitea#29963) Fix the bug that user may logout if he switch pages too fast (go-gitea#29962) Cancel previous runs of the same PR automatically (go-gitea#29961) Exclude `routers/private/tests` from air (go-gitea#29949) Remove codecov badge (go-gitea#29950) Misc color tweaks (go-gitea#29943) Fix and rewrite markup anchor processing (go-gitea#29931) Remove fomantic grid module (go-gitea#29894) Add background to dashboard navbar, fix missing padding (go-gitea#29940) Prevent layout shift in `<overflow-menu>` items (go-gitea#29831) Fix loadOneBranch panic (go-gitea#29938) Fix comment review avatar alignment (go-gitea#29935) Remove the negative margin from `.page-content` (go-gitea#29922) Move notifications to a standalone file (go-gitea#29930) Remove unnecessary ".Link" usages (go-gitea#29929) Remove unnecessary ".Link" usages (go-gitea#29909) Show Actions post step when it's running (go-gitea#29926) Fix the wrong default value of ENABLE_OPENID_SIGNIN on docs (go-gitea#29925) ... # Conflicts: # templates/user/dashboard/issues.tmpl
2 parents ea2609e + 0150095 commit 1be56f1

File tree

95 files changed

+2012
-3092
lines changed

Some content is hidden

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

95 files changed

+2012
-3092
lines changed

.air.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ delay = 1000
88
include_ext = ["go", "tmpl"]
99
include_file = ["main.go"]
1010
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]
11-
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata", "models/fixtures", "models/migrations/fixtures", "modules/migration/file_format_testdata", "modules/avatar/identicon/testdata"]
11+
exclude_dir = [
12+
"models/fixtures",
13+
"models/migrations/fixtures",
14+
"modules/avatar/identicon/testdata",
15+
"modules/avatar/testdata",
16+
"modules/git/tests",
17+
"modules/migration/file_format_testdata",
18+
"routers/private/tests",
19+
"services/gitdiff/testdata",
20+
]
1221
exclude_regex = ["_test.go$", "_gen.go$"]
1322
stop_on_error = true

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"features": {
55
// installs nodejs into container
66
"ghcr.io/devcontainers/features/node:1": {
7-
"version":"20"
7+
"version": "20"
88
},
99
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {},
1010
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
@@ -24,7 +24,7 @@
2424
"DavidAnson.vscode-markdownlint",
2525
"Vue.volar",
2626
"ms-azuretools.vscode-docker",
27-
"zixuanchen.vitest-explorer",
27+
"vitest.explorer",
2828
"qwtel.sqlite-viewer",
2929
"GitHub.vscode-pull-request-github"
3030
]

.eslintrc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ rules:
286286
jquery/no-class: [0]
287287
jquery/no-clone: [2]
288288
jquery/no-closest: [0]
289-
jquery/no-css: [0]
289+
jquery/no-css: [2]
290290
jquery/no-data: [0]
291291
jquery/no-deferred: [2]
292292
jquery/no-delegate: [2]
@@ -409,7 +409,7 @@ rules:
409409
no-jquery/no-constructor-attributes: [2]
410410
no-jquery/no-contains: [2]
411411
no-jquery/no-context-prop: [2]
412-
no-jquery/no-css: [0]
412+
no-jquery/no-css: [2]
413413
no-jquery/no-data: [0]
414414
no-jquery/no-deferred: [2]
415415
no-jquery/no-delegate: [2]

.github/workflows/cron-lock.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ vscode:
4242
- DavidAnson.vscode-markdownlint
4343
- Vue.volar
4444
- ms-azuretools.vscode-docker
45-
- zixuanchen.vitest-explorer
45+
- vitest.explorer
4646
- qwtel.sqlite-viewer
4747
- GitHub.vscode-pull-request-github
4848

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[![](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml/badge.svg?branch=main)](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml?query=branch%3Amain "Release Nightly")
44
[![](https://img.shields.io/discord/322538954119184384.svg?logo=discord&logoColor=white&label=Discord&color=5865F2)](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea")
5-
[![](https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg)](https://app.codecov.io/gh/go-gitea/gitea "Codecov")
65
[![](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea "Go Report Card")
76
[![](https://pkg.go.dev/badge/code.gitea.io/gitea?status.svg)](https://pkg.go.dev/code.gitea.io/gitea "GoDoc")
87
[![](https://img.shields.io/github/release/go-gitea/gitea.svg)](https://github.com/go-gitea/gitea/releases/latest "GitHub release")

README_ZH.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[![](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml/badge.svg?branch=main)](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml?query=branch%3Amain "Release Nightly")
44
[![](https://img.shields.io/discord/322538954119184384.svg?logo=discord&logoColor=white&label=Discord&color=5865F2)](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea")
5-
[![](https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg)](https://app.codecov.io/gh/go-gitea/gitea "Codecov")
65
[![](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea "Go Report Card")
76
[![](https://pkg.go.dev/badge/code.gitea.io/gitea?status.svg)](https://pkg.go.dev/code.gitea.io/gitea "GoDoc")
87
[![](https://img.shields.io/github/release/go-gitea/gitea.svg)](https://github.com/go-gitea/gitea/releases/latest "GitHub release")

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ And the following unique queues:
590590

591591
## OpenID (`openid`)
592592

593-
- `ENABLE_OPENID_SIGNIN`: **false**: Allow authentication in via OpenID.
593+
- `ENABLE_OPENID_SIGNIN`: **true**: Allow authentication in via OpenID.
594594
- `ENABLE_OPENID_SIGNUP`: **! DISABLE\_REGISTRATION**: Allow registering via OpenID.
595595
- `WHITELISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching
596596
OpenID URI's to permit.

docs/content/administration/config-cheat-sheet.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ Gitea 创建以下非唯一队列:
562562

563563
## OpenID (`openid`)
564564

565-
- `ENABLE_OPENID_SIGNIN`: **false**:允许通过OpenID进行身份验证。
565+
- `ENABLE_OPENID_SIGNIN`: **true**:允许通过OpenID进行身份验证。
566566
- `ENABLE_OPENID_SIGNUP`: **! DISABLE\_REGISTRATION**:允许通过OpenID进行注册。
567567
- `WHITELISTED_URIS`: **_empty_**:如果非空,是一组匹配OpenID URI的POSIX正则表达式模式,用于允许访问。
568568
- `BLACKLISTED_URIS`: **_empty_**:如果非空,是一组匹配OpenID URI的POSIX正则表达式模式,用于阻止访问。

models/actions/run.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,16 @@ func updateRepoRunsNumbers(ctx context.Context, repo *repo_model.Repository) err
170170
return err
171171
}
172172

173-
// CancelRunningJobs cancels all running and waiting jobs associated with a specific workflow.
174-
func CancelRunningJobs(ctx context.Context, repoID int64, ref, workflowID string, event webhook_module.HookEventType) error {
175-
// Find all runs in the specified repository, reference, and workflow with statuses 'Running' or 'Waiting'.
173+
// CancelPreviousJobs cancels all previous jobs of the same repository, reference, workflow, and event.
174+
// It's useful when a new run is triggered, and all previous runs needn't be continued anymore.
175+
func CancelPreviousJobs(ctx context.Context, repoID int64, ref, workflowID string, event webhook_module.HookEventType) error {
176+
// Find all runs in the specified repository, reference, and workflow with non-final status
176177
runs, total, err := db.FindAndCount[ActionRun](ctx, FindRunOptions{
177178
RepoID: repoID,
178179
Ref: ref,
179180
WorkflowID: workflowID,
180181
TriggerEvent: event,
181-
Status: []Status{StatusRunning, StatusWaiting},
182+
Status: []Status{StatusRunning, StatusWaiting, StatusBlocked},
182183
})
183184
if err != nil {
184185
return err

models/actions/schedule.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ func CleanRepoScheduleTasks(ctx context.Context, repo *repo_model.Repository) er
127127
return fmt.Errorf("DeleteCronTaskByRepo: %v", err)
128128
}
129129
// cancel running cron jobs of this repository and delete old schedules
130-
if err := CancelRunningJobs(
130+
if err := CancelPreviousJobs(
131131
ctx,
132132
repo.ID,
133133
repo.DefaultBranch,
134134
"",
135135
webhook_module.HookEventSchedule,
136136
); err != nil {
137-
return fmt.Errorf("CancelRunningJobs: %v", err)
137+
return fmt.Errorf("CancelPreviousJobs: %v", err)
138138
}
139139
return nil
140140
}

0 commit comments

Comments
 (0)