Jeremy White : Add context for threads of any kind.

Alexandre Julliard julliard at winehq.org
Mon May 2 05:02:14 CDT 2022


Module: tools
Branch: master
Commit: 8feb70cfc29b465c9644174b0c77cc0ed49951dc
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=8feb70cfc29b465c9644174b0c77cc0ed49951dc

Author: Jeremy White <jwhite at codeweavers.com>
Date:   Thu Apr 28 19:27:34 2022 -0500

Add context for threads of any kind.

Seems to give better context for discussions with diffnotes.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 gitlab/gitlab-to-mail/gitlabtomail.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gitlab/gitlab-to-mail/gitlabtomail.py b/gitlab/gitlab-to-mail/gitlabtomail.py
index 6beedf3..747ac66 100755
--- a/gitlab/gitlab-to-mail/gitlabtomail.py
+++ b/gitlab/gitlab-to-mail/gitlabtomail.py
@@ -336,10 +336,11 @@ def process_commented_on(event):
         diffnote = fetch_diffnotes(event['note']['noteable_iid'], author, event['note']['id'], event['note']['position'])
         body += diffnote
 
-    if event['note']['type'] == 'DiscussionNote':
-        original = find_original_comment(event['note']['noteable_iid'], event['note']['id'])
-        if original:
-            body += quote_original_comment(original)
+    # If we are part of a thread, naively quote the last comment
+    #  this seems slightly improve reported context.
+    original = find_original_comment(event['note']['noteable_iid'], event['note']['id'])
+    if original:
+        body += quote_original_comment(original)
 
     body += event['note']['body']
 




More information about the wine-cvs mailing list