Update operator_engine/pr_actions/handlers/merge_pr.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Alexa Amundson
2025-11-17 23:38:25 -06:00
committed by GitHub
parent f5e60c9495
commit 9b4ac7b35d

View File

@@ -103,6 +103,12 @@ class MergePRHandler(BaseHandler):
action.repo_owner, action.repo_name, pr["base"]["ref"]
)
# Defensive checks for required_checks
if required_checks is None:
required_checks = []
elif not isinstance(required_checks, list):
logger.warning(f"Unexpected required_checks type: {type(required_checks)}")
required_checks = []
# If no required checks, consider it passing
if not required_checks:
return True