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

(cherry picked from commit ffe51fd72f)
This commit is contained in:
Loïc Dachary 2023-02-22 17:05:16 +01:00 committed by Earl Warren
parent 99887cd567
commit a2b483b67d
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -19,7 +19,10 @@ import (
) )
func ListWorkflows(commit *git.Commit) (git.Entries, error) { 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 { if _, ok := err.(git.ErrNotExist); ok {
tree, err = commit.SubTree(".github/workflows") tree, err = commit.SubTree(".github/workflows")
} }