0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-30 14:01:54 +02:00

adjustment

This commit is contained in:
Lunny Xiao 2026-02-22 22:58:28 -08:00
parent c59f0f9167
commit ac3dc5953f
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
3 changed files with 3 additions and 4 deletions

View File

@ -3788,7 +3788,6 @@
"projects.workflows.update_workflow_failed": "Failed to update workflow status",
"projects.workflows.delete_workflow_failed": "Failed to delete workflow",
"projects.workflows.at_least_one_action_required": "At least one action must be configured",
"projects.workflows.error.at_least_one_action": "At least one action must be configured",
"git.filemode.changed_filemode": "%[1]s → %[2]s",
"git.filemode.directory": "Directory",
"git.filemode.normal_file": "Regular",

View File

@ -416,7 +416,7 @@ func WorkflowsPost(ctx *context.Context) {
// Validate: at least one action must be configured
if len(actions) == 0 {
ctx.JSONError(ctx.Tr("projects.workflows.error.at_least_one_action"))
ctx.JSONError(ctx.Tr("projects.workflows.at_least_one_action_required"))
return
}

View File

@ -83,7 +83,7 @@ type WorkflowStoreState = {
const createDefaultFilters = (): WorkflowFilters => ({issue_type: '', source_column: '', target_column: '', labels: []});
const createDefaultActions = (): WorkflowActions => ({column: '', add_labels: [], remove_labels: [], issue_state: ''});
function convertFilters(workflow: any): WorkflowFilters {
function convertFilters(workflow?: WorkflowEvent | null): WorkflowFilters {
const filters = createDefaultFilters();
if (workflow?.filters && Array.isArray(workflow.filters)) {
for (const filter of workflow.filters) {
@ -101,7 +101,7 @@ function convertFilters(workflow: any): WorkflowFilters {
return filters;
}
function convertActions(workflow: any): WorkflowActions {
function convertActions(workflow?: WorkflowEvent | null): WorkflowActions {
const actions = createDefaultActions();
if (workflow?.actions && Array.isArray(workflow.actions)) {