From 4e392ea30223d659052d1d7085263926ef99631e Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Sat, 22 Apr 2023 12:06:29 +0000 Subject: [PATCH] rename Signed-off-by: a1012112796 <1012112796@qq.com> --- modules/actions/workflows.go | 2 +- routers/web/repo/view.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/actions/workflows.go b/modules/actions/workflows.go index 2604788d44682..d560b7718f27a 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -29,7 +29,7 @@ func init() { } } -func IsWorkFlow(path string) bool { +func IsWorkflow(path string) bool { if (!strings.HasSuffix(path, ".yaml")) && (!strings.HasSuffix(path, ".yml")) { return false } diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 00f17f0594b07..45e50cc3cbc0a 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -351,7 +351,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st if issueConfigErr != nil { ctx.Data["FileError"] = strings.TrimSpace(issueConfigErr.Error()) } - } else if actions.IsWorkFlow(ctx.Repo.TreePath) { + } else if actions.IsWorkflow(ctx.Repo.TreePath) { content, err := actions.GetContentFromEntry(entry) if err != nil { log.Error("actions.GetContentFromEntry: %v", err)