diff options
Diffstat (limited to 'app/controllers/ci/builds_controller.rb')
-rw-r--r-- | app/controllers/ci/builds_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/ci/builds_controller.rb b/app/controllers/ci/builds_controller.rb index daf3bcf72a9..b0b8b62fced 100644 --- a/app/controllers/ci/builds_controller.rb +++ b/app/controllers/ci/builds_controller.rb @@ -17,7 +17,7 @@ module Ci if params[:return_to] redirect_to URI.parse(params[:return_to]).path else - redirect_to ci_project_build_path(project, build) + redirect_to build_path(build) end end @@ -28,7 +28,7 @@ module Ci def cancel @build.cancel - redirect_to ci_project_build_path(@project, @build) + redirect_to build_path(@build) end protected @@ -44,5 +44,9 @@ module Ci def commit_by_sha @project.commits.find_by(sha: params[:id]) end + + def build_path(build) + namespace_project_build_path(build.gl_project.namespace, build.gl_project, build) + end end end |