Skip to content

Commit 90bbd9e

Browse files
committed
fix: Update Code Scanning retries
1 parent cf850fb commit 90bbd9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ghastoolkit/octokit/codescanning.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,11 +493,11 @@ def getAnalyses(
493493
docs="https://docs.github.com/en/enterprise-cloud@latest/rest/code-scanning#list-code-scanning-analyses-for-a-repository",
494494
)
495495

496-
if len(results) < 0:
496+
if len(results) == 0:
497497
# If the retry count is less than 1, we don't retry
498-
if self.retry_count < 1:
498+
if self.retry_count > 1:
499499
logger.debug(
500-
f"No analyses found, retrying {counter}/{self.retry_count})"
500+
f"No analyses found, retrying ({counter}/{self.retry_count})"
501501
)
502502
time.sleep(self.retry_sleep)
503503
else:

0 commit comments

Comments
 (0)