From 1d268662cc33212edba72a4e1708d4bae46e21dc 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 3027fddbff35a852f944aef5656edfbd86eb5dbf) (cherry picked from commit 023f7cc3b2c21993b1f43b50130a79fb32374994) (cherry picked from commit 95c3a3aa706045381e83c1558741f1dc02d547b2) (cherry picked from commit 1cc0ef5cc5e3aa74e686396f9584d16c607f37e8) (cherry picked from commit 467d082568b9acd668784e9705f85486c54b91c9) (cherry picked from commit 5d8f40e86507ae17554750498e47dad228557cb1) --- 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 d560b7718f..c5cd8460bd 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -38,7 +38,10 @@ func IsWorkflow(path string) bool { } 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") }