dongjoon-hyun commented on code in PR #56120:
URL: https://github.com/apache/spark/pull/56120#discussion_r3305103238


##########
dev/merge_spark_pr.py:
##########
@@ -1120,6 +1120,10 @@ def main():
     if "[WIP]" in title or "[DO-NOT-MERGE]" in title:
         fail("Cannot merge a PR with [WIP] or [DO-NOT-MERGE] in the 
title:\n%s" % title)
 
+    # Fail hard on draft PRs to prevent accidental merges.
+    if pr.get("draft", False):
+        fail("Cannot merge a draft PR #%s: %s" % (pr_num, title))

Review Comment:
   Since this is simple, could you merge this into the above existing logic 
like the following? I guess this new message is more proper to cover all WIP 
cases.
   ```scala
   if pr.get("draft", False) or "[WIP]" in title or "[DO-NOT-MERGE]" in title:
       fail("Cannot merge a draft PR #%s: %s" % (pr_num, title))
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to