From 8a293ff2046d4db46a5fc9e5d99039a2a58c9e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Wed, 22 Feb 2023 17:05:16 +0100 Subject: [PATCH] [BRANDING] lookup .forgejo/workflows before .gitea/workflows (cherry picked from commit ffe51fd72f384c4644b9329aa201ea80cd7ad7ad) (cherry picked from commit a2b483b67d4f3c1bb214312a35abc6d81a063cde) (cherry picked from commit 2b7d0bbde22830d4d631421613256001b6daecfb) (cherry picked from commit 4a6141187d4304945dc6442da5c76027ee9a2b87) (cherry picked from commit a3ccc97ef887af6aa6c35e0040983f7757523198) (cherry picked from commit 6259e5b9a240af8c2275e017d298c8632b10f47a) --- modules/actions/workflows.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/actions/workflows.go b/modules/actions/workflows.go index e9ff70156f..1574acc6b6 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -30,7 +30,10 @@ func init() { } func ListWorkflows(commit *git.Commit) (git.Entries, error) { - tree, err := commit.SubTree(".gitea/workflows") + tree, err := commit.SubTree(".forgejo/workflows") + if _, ok := err.(git.ErrNotExist); ok { + tree, err = commit.SubTree(".gitea/workflows") + } if _, ok := err.(git.ErrNotExist); ok { tree, err = commit.SubTree(".github/workflows") }