Skip to content

Commit

Permalink
Avoid panic when workflow dir contains other dirs.
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Mendoza <jlm@jlm.name>
  • Loading branch information
jeffmendoza committed Mar 1, 2024
1 parent 68e3449 commit 24b20ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/policies/action/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,10 @@ func listWorkflowsReal(ctx context.Context, c *github.Client, owner, repo string
if err != nil {
return nil, err
}
if fc == nil {
// skip directories
continue
}
content, err := fc.GetContent()
if err != nil {
return nil, err
Expand Down

0 comments on commit 24b20ac

Please sign in to comment.