diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-09 21:07:04 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-09 21:07:04 +0000 |
commit | 1bcebb67d554d95aa77d4cf42b22e7c96e1c8527 (patch) | |
tree | 6c1575d053400cc81db2d31e2d565320baae19ee /app/controllers/projects | |
parent | 4da595a071829d1046f921e402f3978eeca15d93 (diff) | |
download | gitlab-ce-1bcebb67d554d95aa77d4cf42b22e7c96e1c8527.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 17 | ||||
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 17 |
2 files changed, 2 insertions, 32 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index c24b907bb49..26a7b5662be 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -35,7 +35,6 @@ class Projects::BlobController < Projects::ApplicationController before_action :editor_variables, except: [:show, :preview, :diff] before_action :validate_diff_params, only: :diff before_action :set_last_commit_sha, only: [:edit, :update] - before_action :track_experiment, only: :create track_redis_hll_event :create, :update, name: 'g_edit_by_sfe' @@ -54,7 +53,7 @@ class Projects::BlobController < Projects::ApplicationController def create create_commit(Files::CreateService, success_notice: _("The file has been successfully created."), - success_path: -> { create_success_path }, + success_path: -> { project_blob_path(@project, File.join(@branch_name, @file_path)) }, failure_view: :new, failure_path: project_new_blob_path(@project, @ref)) end @@ -282,20 +281,6 @@ class Projects::BlobController < Projects::ApplicationController def visitor_id current_user&.id end - - def create_success_path - if params[:code_quality_walkthrough] - project_pipelines_path(@project, code_quality_walkthrough: true) - else - project_blob_path(@project, File.join(@branch_name, @file_path)) - end - end - - def track_experiment - return unless params[:code_quality_walkthrough] - - experiment(:code_quality_walkthrough, namespace: @project.root_ancestor).track(:commit_created) - end end Projects::BlobController.prepend_mod diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 310b8d1d477..b6a9f01c9c8 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -51,7 +51,6 @@ class Projects::PipelinesController < Projects::ApplicationController respond_to do |format| format.html do - enable_code_quality_walkthrough_experiment enable_runners_availability_section_experiment end format.json do @@ -220,7 +219,7 @@ class Projects::PipelinesController < Projects::ApplicationController PipelineSerializer .new(project: @project, current_user: @current_user) .with_pagination(request, response) - .represent(@pipelines, disable_coverage: true, preload: true, code_quality_walkthrough: params[:code_quality_walkthrough].present?) + .represent(@pipelines, disable_coverage: true, preload: true) end def render_show @@ -305,20 +304,6 @@ class Projects::PipelinesController < Projects::ApplicationController params.permit(:scope, :username, :ref, :status, :source) end - def enable_code_quality_walkthrough_experiment - experiment(:code_quality_walkthrough, namespace: project.root_ancestor) do |e| - e.exclude! unless current_user - e.exclude! unless can?(current_user, :create_pipeline, project) - e.exclude! unless project.root_ancestor.recent? - e.exclude! if @pipelines_count.to_i > 0 - e.exclude! if helpers.has_gitlab_ci?(project) - - e.control {} - e.candidate {} - e.publish_to_database - end - end - def enable_runners_availability_section_experiment return unless current_user return unless can?(current_user, :create_pipeline, project) |