Skip to content

Commit a295390

Browse files
authored
Merge pull request #317 from tekktrik/dev/fix-no-actions-reporting
Fix validator if no CI runs
2 parents 98e9810 + 292672b commit a295390

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

adabot/lib/circuitpython_library_validators.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1261,8 +1261,13 @@ def validate_actions_state(self, repo):
12611261
except pygithub.GithubException: # This can probably be tightened later
12621262
# No workflows or runs yet
12631263
return []
1264-
if workflow_runs[0].conclusion != "success":
1265-
return [ERROR_CI_BUILD]
1264+
try:
1265+
if workflow_runs[0].conclusion != "success":
1266+
return [ERROR_CI_BUILD]
1267+
except IndexError:
1268+
# The CI hasn't run yet, so empty list of workflow runs returned
1269+
# This doesn't indicate a failure, so skip it
1270+
pass
12661271
return []
12671272
except pygithub.RateLimitExceededException:
12681273
core_rate_limit_reset = GH_INTERFACE.get_rate_limit().core.reset

0 commit comments

Comments
 (0)