Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 871cd57

Browse files
author
Tom Bell
committed
Merge pull request #773 from philippbeckmann/jenkins-notifier
jenkins-notifier.coffee: Encode project urls with whitespaces
2 parents af8bfe5 + 554e451 commit 871cd57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scripts/jenkins-notifier.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ module.exports = (robot) ->
4343
build = "STILL"
4444
else
4545
build = "STARTED"
46-
robot.send user, "#{build} FAILING: #{data.name} ##{data.build.number} (#{data.build.full_url})"
46+
robot.send user, "#{build} FAILING: #{data.name} ##{data.build.number} (#{encodeURI(data.build.full_url)})"
4747
@failing.push data.name unless data.name in @failing
4848
if data.build.status == 'SUCCESS'
4949
if data.name in @failing
5050
index = @failing.indexOf data.name
5151
@failing.splice index, 1 if index isnt -1
52-
robot.send user, "BUILD RESTORED: #{data.name} ##{data.build.number} (#{data.build.full_url})"
52+
robot.send user, "BUILD RESTORED: #{data.name} ##{data.build.number} (#{encodeURI(data.build.full_url)})"
5353

5454
catch error
5555
console.log "jenkins-notify error: #{error}. Data: #{req.body}"

0 commit comments

Comments
 (0)