Skip to content

Commit f0b36c9

Browse files
committed
jenkins: append new job URL to existing CI comment
1 parent cf9614f commit f0b36c9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/push-jenkins-update.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function pushStarted (options, build, cb) {
2727
if (existingComment === undefined) {
2828
createPrComment(Object.assign({ number: pr }, options), body)
2929
} else {
30-
editPrComment(options, existingComment.id, body)
30+
editPrComment(options, existingComment.id, `${existingComment.body}\n${body}`)
3131
}
3232
})
3333
}

test/integration/push-jenkins-update.test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ tap.test('Edits existing CI comment when bot has posted a CI comment before', (t
140140

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

146148
nock('https://api.github.com.')

0 commit comments

Comments
 (0)