Merge pull request '[BRANDING] lookup .forgejo/workflows before .gitea/workflows' (#417) from dachary/forgejo:wip-actions-directory into forgejo-branding

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/417
This commit is contained in:
Loïc Dachary 2023-02-22 16:46:30 +00:00
commit 1b68f13281

View file

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