Commit 7ef05ad0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix_ci_services' into 'master'

Fix CI links on MR page

Fixes gitlab-org/gitlab-ci#145

See merge request !609
parent 8ef84b3e
......@@ -27,6 +27,9 @@ v 7.10.0 (unreleased)
- Improve UI for mobile phones on dashboard and project pages
- Add room notification and message color option for HipChat
v 7.10.2
- Fix CI links on MR page
v 7.10.0
- Ignore submodules that are defined in .gitmodules but are checked in as directories.
- Allow projects to be imported from Google Code.
......
......@@ -43,7 +43,7 @@ class GitlabCiService < CiService
end
def commit_status_path(sha, ref)
project_url + "/refs/#{ref}/commits/#{sha}/status.json?token=#{token}"
URI::encode(project_url + "/refs/#{ref}/commits/#{sha}/status.json?token=#{token}")
end
def get_ci_build(sha, ref)
......@@ -90,7 +90,7 @@ class GitlabCiService < CiService
end
def build_page(sha, ref)
project_url + "/refs/#{ref}/commits/#{sha}"
URI::encode(project_url + "/refs/#{ref}/commits/#{sha}")
end
def builds_path
......
......@@ -40,10 +40,12 @@ describe GitlabCiService do
describe :commit_status_path do
it { expect(@service.commit_status_path("2ab7834c", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/2ab7834c/status.json?token=verySecret")}
it { expect(@service.commit_status_path("issue#2", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/issue%232/status.json?token=verySecret")}
end
describe :build_page do
it { expect(@service.build_page("2ab7834c", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/2ab7834c")}
it { expect(@service.build_page("issue#2", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/issue%232")}
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment