@@ -138,7 +138,7 @@ func GetActionWorkflow(ctx *context.APIContext, workflowID string) (*api.ActionW
138138 }
139139 }
140140
141- return nil, fmt.Errorf("workflow not found")
141+ return nil, fmt.Errorf("workflow '%s' not found", workflowID )
142142}
143143
144144func DisableActionWorkflow(ctx *context.APIContext, workflowID string) error {
@@ -150,7 +150,7 @@ func DispatchActionWorkflow(ctx *context.APIContext, workflowID string, opt *api
150150 cfg := cfgUnit.ActionsConfig()
151151
152152 if cfg.IsWorkflowDisabled(workflowID) {
153- ctx.Error(http.StatusInternalServerError, "WorkflowDisabled", ctx.Tr("actions. workflow. disabled"))
153+ ctx.Error(http.StatusInternalServerError, "WorkflowDisabled", fmt.Sprintf(" workflow '%s' is disabled", workflowID ))
154154 return
155155 }
156156
@@ -164,12 +164,12 @@ func DispatchActionWorkflow(ctx *context.APIContext, workflowID string, opt *api
164164 case refName.IsBranch():
165165 runTargetCommit, err = ctx.Repo.GitRepo.GetBranchCommit(refName.BranchName())
166166 default:
167- ctx.Error(http.StatusInternalServerError, "WorkflowRefNameError", ctx.Tr("form.git_ref_name_error ", opt.Ref))
167+ ctx.Error(http.StatusInternalServerError, "WorkflowRefNameError", fmt.Sprintf("%s must be a well-formed Git reference name. ", opt.Ref))
168168 return
169169 }
170170
171171 if err != nil {
172- ctx.Error(http.StatusNotFound, "WorkflowRefNotFound", ctx.Tr("form.target_ref_not_exist ", opt.Ref))
172+ ctx.Error(http.StatusNotFound, "WorkflowRefNotFound", fmt.Sprintf("target ref does not exist %s ", opt.Ref))
173173 return
174174 }
175175
@@ -204,7 +204,7 @@ func DispatchActionWorkflow(ctx *context.APIContext, workflowID string, opt *api
204204 }
205205
206206 if workflow == nil {
207- ctx.Error(http.StatusNotFound, "WorkflowNotFound", ctx.Tr("actions. workflow.not_found ", workflowID))
207+ ctx.Error(http.StatusNotFound, "WorkflowNotFound", fmt.Sprintf(" workflow '%s' is not found ", workflowID))
208208 return
209209 }
210210
0 commit comments