[BRANDING] lookup .forgejo/workflows before .gitea/workflows

(cherry picked from commit ffe51fd72f)
(cherry picked from commit a2b483b67d)
(cherry picked from commit 2b7d0bbde2)
(cherry picked from commit 3027fddbff)
(cherry picked from commit 023f7cc3b2)
(cherry picked from commit 95c3a3aa70)
(cherry picked from commit 1cc0ef5cc5)
(cherry picked from commit 467d082568)
(cherry picked from commit 5d8f40e865)
(cherry picked from commit 1d268662cc)
(cherry picked from commit 326a0fbcc1)
(cherry picked from commit 09368a4993)
(cherry picked from commit 8de4830da0)
This commit is contained in:
Loïc Dachary 2023-02-22 17:05:16 +01:00 committed by Earl Warren
parent 052f2c2aa4
commit 0a7e43f29c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -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")
}