diff options
author | Eva Kadlecová <evka.kadl@gmail.com> | 2018-08-26 17:57:51 +0200 |
---|---|---|
committer | Eva Kadlecová <evka.kadl@gmail.com> | 2018-09-17 14:04:16 +0200 |
commit | 4899dfcafe55ca2935d699f85c13fc35a8e16545 (patch) | |
tree | 3f768fdd885c2f2535d964c38c46649ef84f77db /app/controllers | |
parent | 120ce02e5e7e72654cb42edddc25ff3b057ec136 (diff) | |
download | gitlab-ce-4899dfcafe55ca2935d699f85c13fc35a8e16545.tar.gz |
Redirect to the pipeline builds page when a build is canceled
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/jobs_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb index e69faae754a..009d8afd523 100644 --- a/app/controllers/projects/jobs_controller.rb +++ b/app/controllers/projects/jobs_controller.rb @@ -1,5 +1,6 @@ class Projects::JobsController < Projects::ApplicationController include SendFileUpload + include ContinueParams before_action :build, except: [:index, :cancel_all] before_action :authorize_read_build! @@ -101,7 +102,12 @@ class Projects::JobsController < Projects::ApplicationController return respond_422 unless @build.cancelable? @build.cancel - redirect_to build_path(@build) + + if continue_params + redirect_to continue_params[:to] + else + redirect_to builds_project_pipeline_path(@project, @build.pipeline.id) + end end def status |