Skip to content

Commit 9f546ab

Browse files
fix merge error
1 parent 79fa662 commit 9f546ab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

services/actions/workflow.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ func GetActionWorkflow(ctx *context.APIContext, workflowID string) (*api.ActionW
141141

142142
func DispatchActionWorkflow(ctx reqctx.RequestContext, doer *user_model.User, repo *repo_model.Repository, gitRepo *git.Repository, workflowID, ref string, processInputs func(model *model.WorkflowDispatch, inputs map[string]any) error) error {
143143
if workflowID == "" {
144-
return util.ErrWrapLocale(
144+
return util.ErrorWrapLocale(
145145
util.NewNotExistErrorf("workflowID is empty"),
146146
"actions.workflow.not_found", workflowID,
147147
)
148148
}
149149

150150
if ref == "" {
151-
return util.ErrWrapLocale(
151+
return util.ErrorWrapLocale(
152152
util.NewNotExistErrorf("ref is empty"),
153153
"form.target_ref_not_exist", ref,
154154
)
@@ -158,7 +158,7 @@ func DispatchActionWorkflow(ctx reqctx.RequestContext, doer *user_model.User, re
158158
cfgUnit := repo.MustGetUnit(ctx, unit.TypeActions)
159159
cfg := cfgUnit.ActionsConfig()
160160
if cfg.IsWorkflowDisabled(workflowID) {
161-
return util.ErrWrapLocale(
161+
return util.ErrorWrapLocale(
162162
util.NewPermissionDeniedErrorf("workflow is disabled"),
163163
"actions.workflow.disabled",
164164
)
@@ -177,7 +177,7 @@ func DispatchActionWorkflow(ctx reqctx.RequestContext, doer *user_model.User, re
177177
runTargetCommit, err = gitRepo.GetBranchCommit(ref)
178178
}
179179
if err != nil {
180-
return util.ErrWrapLocale(
180+
return util.ErrorWrapLocale(
181181
util.NewNotExistErrorf("ref %q doesn't exist", ref),
182182
"form.target_ref_not_exist", ref,
183183
)
@@ -208,7 +208,7 @@ func DispatchActionWorkflow(ctx reqctx.RequestContext, doer *user_model.User, re
208208
}
209209

210210
if len(workflows) == 0 {
211-
return util.ErrWrapLocale(
211+
return util.ErrorWrapLocale(
212212
util.NewNotExistErrorf("workflow %q doesn't exist", workflowID),
213213
"actions.workflow.not_found", workflowID,
214214
)

0 commit comments

Comments
 (0)