diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2019-05-13 11:55:01 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2019-05-13 11:55:01 +0200 |
commit | 971f488eaa29882a09d9b8be44faea310a604171 (patch) | |
tree | 6f63ef6e8a4061f854d3c5bdedfb6606bfacc0fa /qa | |
parent | fb079edcc027c9e4bf5966484e2a1db003177b0a (diff) |
QA: Fix first line duplication
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/bugzillaAutomation.py | 8 |
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'])) |