diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-05 15:22:01 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-05 15:22:01 +0000 |
commit | 5bff135fb3dbd1af855f8cd94b4bed76d2cbc42e (patch) | |
tree | 2c9ea0480635489910ba77ae97677cd3eaf4ccde | |
parent | 1132084d3fcbb5623546730a6269b2a5d1c2ada3 (diff) | |
parent | 2144cc710a8aec35e8f0bfee8d398d884b9bb523 (diff) | |
download | gitlab-ce-5bff135fb3dbd1af855f8cd94b4bed76d2cbc42e.tar.gz |
Merge branch 'fix_ci_services' into 'master'
Fix CI links on MR page
Fixes gitlab-org/gitlab-ci#145
See merge request !609
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | app/models/project_services/gitlab_ci_service.rb | 4 | ||||
-rw-r--r-- | spec/models/project_services/gitlab_ci_service_spec.rb | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG index 671b41b26e2..88678b087c5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -45,6 +45,9 @@ v 7.11.0 (unreleased) - Add footnotes support to Markdown (Guillaume Delbergue) - Add current_sign_in_at to UserFull REST api. +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. diff --git a/app/models/project_services/gitlab_ci_service.rb b/app/models/project_services/gitlab_ci_service.rb index f95bd79dfd6..949a4d7111b 100644 --- a/app/models/project_services/gitlab_ci_service.rb +++ b/app/models/project_services/gitlab_ci_service.rb @@ -44,7 +44,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) @@ -91,7 +91,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 diff --git a/spec/models/project_services/gitlab_ci_service_spec.rb b/spec/models/project_services/gitlab_ci_service_spec.rb index afacd4afaf4..e5bf9125313 100644 --- a/spec/models/project_services/gitlab_ci_service_spec.rb +++ b/spec/models/project_services/gitlab_ci_service_spec.rb @@ -41,10 +41,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 |