[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 4a6141187d)
(cherry picked from commit a3ccc97ef8)
This commit is contained in:
Loïc Dachary 2023-02-22 17:05:16 +01:00
parent 60f53af40c
commit 6259e5b9a2
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -20,7 +20,10 @@ import (
)
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")
}