You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ya...@apache.org on 2022/02/22 06:21:00 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #1957] Skip html comments in merge commit test body from PR desc

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

yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b42537  [KYUUBI #1957] Skip html comments in merge commit test body from PR desc
9b42537 is described below

commit 9b42537164c2215549f0cead0c015f41d4725a65
Author: Kent Yao <ya...@apache.org>
AuthorDate: Tue Feb 22 14:19:49 2022 +0800

    [KYUUBI #1957] Skip html comments in merge commit test body from PR desc
    
    ### _Why are the changes needed?_
    
    Make the `git log` pretty
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #1957 from yaooqinn/merge.
    
    Closes #1957
    
    95be6266 [Kent Yao] Skip html comments in merge commit test body from PR desc
    dfc8f2f8 [Kent Yao] Skip html comments in merge commit test body from PR desc
    8b3eeffe [Kent Yao] Skip html comments in merge commit test body from PR desc
    
    Authored-by: Kent Yao <ya...@apache.org>
    Signed-off-by: Kent Yao <ya...@apache.org>
---
 dev/merge_kyuubi_pr.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev/merge_kyuubi_pr.py b/dev/merge_kyuubi_pr.py
index 5ca1f93..fc2e6df 100755
--- a/dev/merge_kyuubi_pr.py
+++ b/dev/merge_kyuubi_pr.py
@@ -243,7 +243,7 @@ def main():
     url = pr["url"]
     title = pr["title"]
     title = fix_title(title, pr_num)
-    body = pr["body"]
+    body = re.sub(re.compile(r"<!--[^>]*-->\n?", re.DOTALL), "", pr["body"]).lstrip()
     target_ref = pr["base"]["ref"]
     user_login = pr["user"]["login"]
     base_ref = pr["head"]["ref"]
@@ -274,8 +274,8 @@ def main():
         continue_maybe(msg)
 
     print("\n=== Pull Request #%s ===" % pr_num)
-    print("title\t%s\nsource\t%s\ntarget\t%s\nurl\t%s" %
-          (title, pr_repo_desc, target_ref, url))
+    print("title:\t%s\nsource:\t%s\ntarget:\t%s\nurl:\t%s\nbody:\n\n%s" %
+          (title, pr_repo_desc, target_ref, url, body))
     continue_maybe("Proceed with merging pull request #%s?" % pr_num)
 
     merged_refs = [target_ref]