This is an automated email from the ASF dual-hosted git repository.

frankvicky pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 472c2cfcb49 MINOR: Improve the prompt in committer-tools/reviewers.py 
(#19942)
472c2cfcb49 is described below

commit 472c2cfcb4995b05bdad8788bf6dda8c26852d7a
Author: Ming-Yen Chung <mingyen...@gmail.com>
AuthorDate: Tue Jun 10 17:37:57 2025 +0800

    MINOR: Improve the prompt in committer-tools/reviewers.py (#19942)
    
    Previously, the confirmation prompt for updating the PR body treated any
    input other than 'n' as approval, which could lead to unintended
    actions.
    
    With this change, the update will only proceed if the user enters 'y',
    'Y', or presses Enter. For any other input, the operation is canceled
    and an Abort. message is printed. This makes the prompt behavior clearer
    and more predictable.
    
    Reviewers: TengYao Chi <frankvi...@apache.org>, PoAn Yang
    <pay...@apache.org>, Kuan-Po Tseng <brandb...@gmail.com>, Ken Huang
    <s7133...@gmail.com>, Lan Ding <isdin...@163.com>
---
 committer-tools/reviewers.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/committer-tools/reviewers.py b/committer-tools/reviewers.py
index a3539f9d9c3..06ba4919213 100755
--- a/committer-tools/reviewers.py
+++ b/committer-tools/reviewers.py
@@ -63,8 +63,9 @@ def append_message_to_pr_body(pr: int , message: str):
         return
 
     print(f"""New PR body will be:\n\n---\n{updated_pr_body}---\n""")
-    choice = input(f'Update the body of "{pr_title}"? (y/n): ').strip().lower()
-    if choice in ['n', 'no']:
+    choice = input(f'Update the body of "{pr_title}"? [Y/n] ').strip().lower()
+    if choice not in ['', 'y']:
+        print("Abort.")
         return
 
     try:

Reply via email to