Skip to content

Commit

Permalink
ignore invalid ymls
Browse files Browse the repository at this point in the history
  • Loading branch information
mas0nd committed Apr 17, 2024
1 parent 1218ec5 commit d1e31e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gato/enumerate/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def __perform_yml_enumeration(self, repository: Repository):
for (wf, yml) in ymls:
try:
parsed_yml = WorkflowParser(yml, repository.name, wf)
if not parsed_yml:
continue
self_hosted_jobs = parsed_yml.self_hosted()

if self_hosted_jobs:
Expand Down
2 changes: 1 addition & 1 deletion gato/workflow_parser/workflow_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def self_hosted(self):
runners.
"""
sh_jobs = []
if 'jobs' not in self.parsed_yml:
if not self.parsed_yml or 'jobs' not in self.parsed_yml:
return sh_jobs

for jobname, job_details in self.parsed_yml['jobs'].items():
Expand Down

0 comments on commit d1e31e8

Please sign in to comment.