From 932a247f5fb4a14b3e096ec88a73f8fce481eebb Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 12 Jan 2016 17:32:25 +0800 Subject: Use CGI.escape instead of URI.escape, because URI is obsoleted. ref: https://github.com/ruby/ruby/commit/238b979f1789f95262a267d8df6239806f2859cc --- app/models/project_services/hipchat_service.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/models/project_services') diff --git a/app/models/project_services/hipchat_service.rb b/app/models/project_services/hipchat_service.rb index 32a81808930..0e3fa4a40fe 100644 --- a/app/models/project_services/hipchat_service.rb +++ b/app/models/project_services/hipchat_service.rb @@ -120,13 +120,13 @@ class HipchatService < Service message << "#{push[:user_name]} " if Gitlab::Git.blank_ref?(before) message << "pushed new #{ref_type} #{ref}"\ + "#{project_url}/commits/#{CGI.escape(ref)}\">#{ref}"\ " to #{project_link}\n" elsif Gitlab::Git.blank_ref?(after) message << "removed #{ref_type} #{ref} from #{project_name} \n" else message << "pushed to #{ref_type} #{ref} " + "#{project.web_url}/commits/#{CGI.escape(ref)}\">#{ref} " message << "of #{project.name_with_namespace.gsub!(/\s/,'')} " message << "(Compare changes)" @@ -255,8 +255,8 @@ class HipchatService < Service status = data[:commit][:status] duration = data[:commit][:duration] - branch_link = "#{ref}" - commit_link = "#{Commit.truncate_sha(sha)}" + branch_link = "#{ref}" + commit_link = "#{Commit.truncate_sha(sha)}" "#{project_link}: Commit #{commit_link} of #{branch_link} #{ref_type} by #{user_name} #{humanized_status(status)} in #{duration} second(s)" end -- cgit v1.2.1