diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-04-07 11:30:32 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-04-07 11:30:32 +0300 |
commit | 15e87cea3a374e8d929c28f6843170b182fe159a (patch) | |
tree | 628d14a453f307c229296b508b37d8d56e93a1b4 /app/controllers | |
parent | c970fa973d482c50820db75d08d74bd5c1e9d475 (diff) | |
parent | 38796f56173caa2ed6575a4f60f7bf07ed90af55 (diff) |
Merge branch '8998_skip_pending_commits_if_not_head' into 'master'
Add auto-cancel for pending pipelines on branch, if they are not HEAD
See merge request !9362
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/pipelines_settings_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 5de8301f74c..1780cc0233c 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -116,7 +116,7 @@ class Projects::PipelinesController < Projects::ApplicationController end def pipeline - @pipeline ||= project.pipelines.find_by!(id: params[:id]) + @pipeline ||= project.pipelines.find_by!(id: params[:id]).present(current_user: current_user) end def commit diff --git a/app/controllers/projects/pipelines_settings_controller.rb b/app/controllers/projects/pipelines_settings_controller.rb index c8c80551ac9..ff50602831c 100644 --- a/app/controllers/projects/pipelines_settings_controller.rb +++ b/app/controllers/projects/pipelines_settings_controller.rb @@ -23,7 +23,7 @@ class Projects::PipelinesSettingsController < Projects::ApplicationController def update_params params.require(:project).permit( :runners_token, :builds_enabled, :build_allow_git_fetch, :build_timeout_in_minutes, :build_coverage_regex, - :public_builds + :public_builds, :auto_cancel_pending_pipelines ) end end |