ci: squash and merge script update to allow merging less restrictively (#610)

Fix branch status check for merge readiness

Previously, any non-"CLEAN" status prevented merging. The check now specifically fails only if the branch is "BEHIND", allowing other statuses to proceed if valid. This ensures more accurate merge validations.
This commit is contained in:
DevTekVE
2025-01-22 13:41:56 +01:00
committed by GitHub
parent 9fe4d7ecc7
commit 403d77ff3f

View File

@@ -73,7 +73,7 @@ def validate_pr(pr):
if not merge_data.get('mergeable'):
return False, "Merge conflicts detected"
if (mergeStateStatus := merge_data.get('mergeStateStatus')) != "CLEAN":
if (mergeStateStatus := merge_data.get('mergeStateStatus')) == "BEHIND":
return False, f"Branch is `{mergeStateStatus}`"
return True, None