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

New commits:
commit 971f488eaa29882a09d9b8be44faea310a604171
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon May 13 11:55:01 2019 +0200
Commit:     Xisco Fauli <xiscofa...@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']))
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to