[Libreoffice-commits] dev-tools.git: qa/bugzillaAutomation.py

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon May 13 10:48:38 UTC 2019


 qa/bugzillaAutomation.py |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 971f488eaa29882a09d9b8be44faea310a604171
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon May 13 11:55:01 2019 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon May 13 11:55:01 2019 +0200

    QA: Fix first line duplication

diff --git a/qa/bugzillaAutomation.py b/qa/bugzillaAutomation.py
index 7603f44..669b2ca 100755
--- a/qa/bugzillaAutomation.py
+++ b/qa/bugzillaAutomation.py
@@ -137,11 +137,13 @@ def post_comment(statList, keyInStatList, commentId, comment, addFirstLine, chan
         rGet.close()
 
         if commentId not in rawData['bugs'][bugId]['comments'][-1]['text']:
-
             if addFirstLine:
                 firstLine = "Dear " + creator + ",\\n\\n"
-                comment = firstLine + comment
-            command = '{"comment" : "' + comment.replace('\n', '\\n') + '", "is_private" : false}'
+                fullComment = firstLine + comment
+            else:
+                fullComment = comment
+
+            command = '{"comment" : "' + fullComment.replace('\n', '\\n') + '", "is_private" : false}'
             urlPost = 'https://bugs.documentfoundation.org/rest/bug/' + bugId + '/comment?api_key=' + cfg['configQA']['api-key']
             rPost = requests.post(urlPost, command.encode('utf-8'))
             print('Bug: ' + bugId + ' - Comment: ' + str(json.loads(rPost.text)['id']))


More information about the Libreoffice-commits mailing list