Skip to content

Commit 0338bd3

Browse files
committed
jenkins: append new job URL to existing CI comment
1 parent 52e04be commit 0338bd3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/push-jenkins-update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function pushStarted (options, build, cb) {
2626
if (existingComment === undefined) {
2727
createPrComment(Object.assign({ number: pr }, options), body)
2828
} else {
29-
editPrComment(options, existingComment.id, body)
29+
editPrComment(options, existingComment.id, `${existingComment.body}\n${body}`)
3030
}
3131
})
3232
}

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

Lines changed: 3 additions & 1 deletion
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)