summaryrefslogtreecommitdiff
path: root/app/controllers/projects/blob_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-09 21:07:04 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-09 21:07:04 +0000
commit1bcebb67d554d95aa77d4cf42b22e7c96e1c8527 (patch)
tree6c1575d053400cc81db2d31e2d565320baae19ee /app/controllers/projects/blob_controller.rb
parent4da595a071829d1046f921e402f3978eeca15d93 (diff)
downloadgitlab-ce-1bcebb67d554d95aa77d4cf42b22e7c96e1c8527.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects/blob_controller.rb')
-rw-r--r--app/controllers/projects/blob_controller.rb17
1 files changed, 1 insertions, 16 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