Skip to content

Commit

Permalink
Add kibanamachine support to Github PR comments (elastic#53852)
Browse files Browse the repository at this point in the history
* 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 d31f579.
  • Loading branch information
brianseeders committed Dec 31, 2019
1 parent f850bb8 commit 66b60f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vars/githubPr.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def withDefaultPrComments(closure) {
def message = getNextCommentMessage(info)
postComment(message)

if (lastComment) {
if (lastComment && lastComment.user.login == 'kibanamachine') {
deleteComment(lastComment.id)
}
}
Expand All @@ -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) {
Expand Down

0 comments on commit 66b60f8

Please sign in to comment.