Skip to content

Commit 9b71743

Browse files
committed
Added check if no tests exists
1 parent 2bfeedb commit 9b71743

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.8.4
1+
v1.8.5

pydocteur/pr_status.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ def is_pr_tests_passed(pr):
1111
logger.info(f"Checking PR #{pr.number} CI results")
1212
last_commit = [commit for commit in pr.get_commits()][-1]
1313
check_suites = [suite for suite in last_commit.get_check_suites() if suite.app.name == "GitHub Actions"]
14+
if len(check_suites) == 0:
15+
logging.info(f"PR #{pr.number} has no tests.")
16+
return False
1417
statuses = [suite.status for suite in check_suites]
1518
conclusions = [suite.conclusion for suite in check_suites]
1619
are_all_checks_done = all(status == "completed" for status in statuses)

0 commit comments

Comments
 (0)