Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/application_controller.rb')
-rw-r--r--app/controllers/projects/application_controller.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb
index 30c6f4d865a..4bfee0c9c82 100644
--- a/app/controllers/projects/application_controller.rb
+++ b/app/controllers/projects/application_controller.rb
@@ -91,6 +91,19 @@ class Projects::ApplicationController < ApplicationController
def check_issues_available!
return render_404 unless @project.feature_available?(:issues, current_user)
end
+
+ def set_is_ambiguous_ref
+ return @is_ambiguous_ref if defined? @is_ambiguous_ref
+
+ @is_ambiguous_ref = if Feature.enabled?(:ambiguous_ref_modal, @project)
+ ExtractsRef::RequestedRef
+ .new(@project.repository, ref_type: ref_type, ref: @ref)
+ .find
+ .fetch(:ambiguous, false)
+ else
+ false
+ end
+ end
end
Projects::ApplicationController.prepend_mod_with('Projects::ApplicationController')