[7.4] Add kibanamachine support to Github PR comments (#53852) (#53873)

* Add kibanamachine support to Github PR comments

* Temporary commit for quick successful pipeline

* Only delete the last comment if it was made by kibanamachine

* Revert "Temporary commit for quick successful pipeline"

This reverts commit d31f579697.
This commit is contained in:
Brian Seeders 2019-12-31 21:42:29 -05:00 committed by GitHub
parent 8f97127c85
commit fef3897622
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,7 @@ def withDefaultPrComments(closure) {
def message = getNextCommentMessage(info)
postComment(message)
if (lastComment) {
if (lastComment && lastComment.user.login == 'kibanamachine') {
deleteComment(lastComment.id)
}
}
@ -49,7 +49,7 @@ def isPr() {
def getLatestBuildComment() {
return getComments()
.reverse()
.find { it.user.login == 'elasticmachine' && it.body =~ /<!--PIPELINE/ }
.find { (it.user.login == 'elasticmachine' || it.user.login == 'kibanamachine') && it.body =~ /<!--PIPELINE/ }
}
def getBuildInfoFromComment(commentText) {