Skip to content

Commit

Permalink
jenkins: append new job URL to existing CI comment
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipj committed Mar 28, 2019
1 parent 52e04be commit 0338bd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/push-jenkins-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function pushStarted (options, build, cb) {
if (existingComment === undefined) {
createPrComment(Object.assign({ number: pr }, options), body)
} else {
editPrComment(options, existingComment.id, body)
editPrComment(options, existingComment.id, `${existingComment.body}\n${body}`)
}
})
}
Expand Down
4 changes: 3 additions & 1 deletion test/integration/push-jenkins-update.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ tap.test('Edits existing CI comment when bot has posted a CI comment before', (t

const editCommentScope = nock('https://api.github.com')
.filteringPath(ignoreQueryParams)
.patch('/repos/nodejs/node/issues/comments/476584580', { body: 'CI: https://ci.nodejs.org/job/node-test-pull-request/21633/' })
.patch('/repos/nodejs/node/issues/comments/476584580', {
body: `CI: https://ci.nodejs.org/job/node-test-pull-request/21904/\nCI: https://ci.nodejs.org/job/node-test-pull-request/21633/`
})
.reply(200)

nock('https://api.github.com')
Expand Down

0 comments on commit 0338bd3

Please sign in to comment.