Fix 404 error when clicking the branch link on hipchat message
This commit is contained in:
parent
9879c427ce
commit
a10f5fadb5
1 changed files with 6 additions and 2 deletions
|
@ -57,11 +57,15 @@ class HipchatService < Service
|
|||
message = ""
|
||||
message << "#{push[:user_name]} "
|
||||
if before =~ /000000/
|
||||
message << "pushed new branch <a href=\"#{project.web_url}/commits/#{ref}\">#{ref}</a> to <a href=\"#{project.web_url}\">#{project.name_with_namespace.gsub!(/\s/,'')}</a>\n"
|
||||
message << "pushed new branch <a href=\""\
|
||||
"#{project.web_url}/commits/#{URI.escape(ref)}\">#{ref}</a>"\
|
||||
" to <a href=\"#{project.web_url}\">"\
|
||||
"#{project.name_with_namespace.gsub!(/\s/, "")}</a>\n"
|
||||
elsif after =~ /000000/
|
||||
message << "removed branch #{ref} from <a href=\"#{project.web_url}\">#{project.name_with_namespace.gsub!(/\s/,'')}</a> \n"
|
||||
else
|
||||
message << "pushed to branch <a href=\"#{project.web_url}/commits/#{ref}\">#{ref}</a> "
|
||||
message << "pushed to branch <a href=\""\
|
||||
"#{project.web_url}/commits/#{URI.escape(ref)}\">#{ref}</a> "
|
||||
message << "of <a href=\"#{project.web_url}\">#{project.name_with_namespace.gsub!(/\s/,'')}</a> "
|
||||
message << "(<a href=\"#{project.web_url}/compare/#{before}...#{after}\">Compare changes</a>)"
|
||||
for commit in push[:commits] do
|
||||
|
|
Loading…
Reference in a new issue