summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2019-05-13 11:55:01 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2019-05-13 11:55:01 +0200
commit971f488eaa29882a09d9b8be44faea310a604171 (patch)
tree6f63ef6e8a4061f854d3c5bdedfb6606bfacc0fa /qa
parentfb079edcc027c9e4bf5966484e2a1db003177b0a (diff)
QA: Fix first line duplication
Diffstat (limited to 'qa')
-rwxr-xr-xqa/bugzillaAutomation.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/qa/bugzillaAutomation.py b/qa/bugzillaAutomation.py
index 7603f44e..669b2ca9 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']))