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

Commit 83e6e52

Browse files
committed
Merge pull request #484 from CedricGatay/fix/trac
Trac Hubot-Script
2 parents 2099b04 + 87792e0 commit 83e6e52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scripts/trac.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ module.exports = (robot) ->
141141

142142
ticketid = response[0]
143143
issue = response[3]
144-
url = process.env.HUBOT_TRAC_URL+"/ticket/"+ticketid
145144

146145
if !ticketid
147146
console.log 'Error understanding trac response', ticket, response
148147
return
149148

149+
url = process.env.HUBOT_TRAC_URL+"/ticket/"+ticketid
150150
msg.send "Trac \##{ticketid}: #{issue.summary}. #{issue.owner} / #{issue.status}, #{issue.milestone} #{url}"
151151

152152
# fetch a ticket using http scraping
@@ -155,7 +155,7 @@ module.exports = (robot) ->
155155
['#ticket h2.summary', 'td[headers=h_owner]', '#trac-ticket-title .status', 'td[headers=h_milestone]']
156156
(err, response) ->
157157
console.log 'scrape response', response
158-
url = process.env.HUBOT_TRAC_URL+"/ticket/"+ticketid
158+
url = process.env.HUBOT_TRAC_URL+"/ticket/"+ticket
159159
msg.send "Trac \##{ticket}: #{response[0]}. #{response[1]} / #{response[2]}, #{response[3]} #{url}"
160160

161161

@@ -217,4 +217,4 @@ module.exports = (robot) ->
217217
robot.hear /([^\w]|^)r(\d+)(?=[^\w]|$)/ig, handleChangeset
218218
# trigger on [123]
219219
robot.hear /([^\w]|^)\[(\d+)\](?=[^\w]|$)/ig, handleChangeset
220-
220+

0 commit comments

Comments
 (0)