Skip to content

Commit 766725b

Browse files
committed
add ErrMsg
1 parent 77a898a commit 766725b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3351,6 +3351,6 @@ runs.closed_tab = %d Closed
33513351
runs.commit = Commit
33523352
runs.pushed_by = Pushed by
33533353
runs.valid_workflow_helper = Workflow config file is valid.
3354-
runs.invalid_workflow_helper = Workflow config file is invalid. Please check your config file.
3354+
runs.invalid_workflow_helper = Workflow config file is invalid. Please check your config file: %s
33553355
33563356
need_approval_desc = Need approval to run workflows for fork pull request.

routers/web/repo/actions/actions.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const (
2626
type WorkFlow struct {
2727
Entry git.TreeEntry
2828
IsInvalid bool
29+
ErrMsg string
2930
}
3031

3132
// MustEnableActions check if actions are enabled in settings
@@ -83,6 +84,7 @@ func List(ctx *context.Context) {
8384
_, err = actions.GetEventsFromContent(content)
8485
if err != nil {
8586
workflow.IsInvalid = true
87+
workflow.ErrMsg = err.Error()
8688
}
8789
workflows = append(workflows, workflow)
8890
}

templates/repo/actions/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{{range .workflows}}
1212
<a class="item{{if eq .Entry.Name $.CurWorkflow}} active{{end}}" href="{{$.Link}}?workflow={{.Entry.Name}}">{{.Entry.Name}}
1313
{{if .IsInvalid}}
14-
<span class="tooltip gt-vm" data-content="{{$.locale.Tr "actions.runs.invalid_workflow_helper"}}">
14+
<span class="tooltip gt-vm" data-content="{{$.locale.Tr "actions.runs.invalid_workflow_helper" (.ErrMsg)}}">
1515
<i class="warning icon red"></i>
1616
</span>
1717
{{else}}

0 commit comments

Comments
 (0)