Skip to content

Commit 24b20ac

Browse files
committedMar 1, 2024·
Avoid panic when workflow dir contains other dirs.
Signed-off-by: Jeff Mendoza <[email protected]>
1 parent 68e3449 commit 24b20ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎pkg/policies/action/action.go

+4
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,10 @@ func listWorkflowsReal(ctx context.Context, c *github.Client, owner, repo string
712712
if err != nil {
713713
return nil, err
714714
}
715+
if fc == nil {
716+
// skip directories
717+
continue
718+
}
715719
content, err := fc.GetContent()
716720
if err != nil {
717721
return nil, err

0 commit comments

Comments
 (0)
Please sign in to comment.