Skip to content

Commit 5241e9a

Browse files
committed
Fix bug
1 parent 790caec commit 5241e9a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/actions/workflows.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ func IsWorkflow(path string) bool {
4444
return strings.HasPrefix(path, ".gitea/workflows") || strings.HasPrefix(path, ".github/workflows")
4545
}
4646

47-
func ListWorkflows(tree *git.Tree) (string, git.Entries, error) {
47+
func ListWorkflows(rootTree *git.Tree) (string, git.Entries, error) {
4848
rpath := ".gitea/workflows"
49-
tree, err := tree.SubTree(rpath)
49+
tree, err := rootTree.SubTree(rpath)
5050
if _, ok := err.(git.ErrNotExist); ok {
5151
rpath = ".github/workflows"
52-
tree, err = tree.SubTree(rpath)
52+
tree, err = rootTree.SubTree(rpath)
5353
}
5454
if _, ok := err.(git.ErrNotExist); ok {
5555
return "", nil, nil

0 commit comments

Comments
 (0)