Commit 47b3f53e authored by Douwe Maan's avatar Douwe Maan

Merge branch 'dz-use-less-deprecated-methods-ee' into 'master'

Use Project#full_name instead of name_with_namespace

Closes gitlab-ce#30786

See merge request gitlab-org/gitlab-ee!4879
parents 618eb57f 4acdb0e4
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#{ commit_text.html_safe } #{ commit_text.html_safe }
- if show_project_name - if show_project_name
%span.project_namespace %span.project_namespace
= project.name_with_namespace = project.full_name
.commit-actions.flex-row.hidden-xs .commit-actions.flex-row.hidden-xs
- if request.xhr? - if request.xhr?
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
- if @project - if @project
= file_name = file_name
- else - else
#{project.name_with_namespace}: #{project.full_name}:
%i= file_name %i= file_name
- if blob.data - if blob.data
.file-content.code.term .file-content.code.term
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
- if @project - if @project
= wiki_blob.basename = wiki_blob.basename
- else - else
#{project.name_with_namespace}: #{project.full_name}:
%i= wiki_blob.basename %i= wiki_blob.basename
.file-content.code.term .file-content.code.term
= render 'shared/file_highlight', blob: wiki_blob, first_line_number: wiki_blob.startline = render 'shared/file_highlight', blob: wiki_blob, first_line_number: wiki_blob.startline
...@@ -18,7 +18,7 @@ module AuditLogsHelper ...@@ -18,7 +18,7 @@ module AuditLogsHelper
def admin_project_dropdown_label(default_label) def admin_project_dropdown_label(default_label)
if @entity if @entity
@entity.name_with_namespace @entity.full_name
else else
default_label default_label
end end
......
- pretty_name = defined?(@project) ? @project.name_with_namespace : 'namespace / path' - pretty_name = defined?(@project) ? @project.full_name : 'namespace / path'
- run_actions_text = "Perform common operations on GitLab project: #{pretty_name}" - run_actions_text = "Perform common operations on GitLab project: #{pretty_name}"
.well .well
......
...@@ -17,14 +17,14 @@ class ElasticBatchProjectIndexerWorker ...@@ -17,14 +17,14 @@ class ElasticBatchProjectIndexerWorker
private private
def run_indexer(project) def run_indexer(project)
logger.info "Indexing #{project.name_with_namespace} (ID=#{project.id})..." logger.info "Indexing #{project.full_name} (ID=#{project.id})..."
last_commit = project.index_status.try(:last_commit) last_commit = project.index_status.try(:last_commit)
Gitlab::Elastic::Indexer.new(project).run(last_commit) Gitlab::Elastic::Indexer.new(project).run(last_commit)
logger.info "Indexing #{project.name_with_namespace} (ID=#{project.id}) is done!" logger.info "Indexing #{project.full_name} (ID=#{project.id}) is done!"
rescue => err rescue => err
logger.warn("#{err.message} indexing #{project.name_with_namespace} (ID=#{project.id}), trace - #{err.backtrace}") logger.warn("#{err.message} indexing #{project.full_name} (ID=#{project.id}), trace - #{err.backtrace}")
end end
def build_relation(start, finish, update_index) def build_relation(start, finish, update_index)
......
...@@ -46,7 +46,7 @@ namespace :gitlab do ...@@ -46,7 +46,7 @@ namespace :gitlab do
projects.find_each do |project| projects.find_each do |project|
unless project.wiki.empty? unless project.wiki.empty?
puts "Indexing wiki of #{project.name_with_namespace}..." puts "Indexing wiki of #{project.full_name}..."
begin begin
project.wiki.index_blobs project.wiki.index_blobs
......
...@@ -60,7 +60,7 @@ FactoryBot.define do ...@@ -60,7 +60,7 @@ FactoryBot.define do
repository_storage_name { project.repository_storage } repository_storage_name { project.repository_storage }
repository_storage_path { project.repository_storage_path } repository_storage_path { project.repository_storage_path }
deleted_path { project.path_with_namespace } deleted_path { project.full_path }
deleted_project_name { project.name } deleted_project_name { project.name }
end end
......
...@@ -75,7 +75,7 @@ describe Project, elastic: true do ...@@ -75,7 +75,7 @@ describe Project, elastic: true do
) )
) )
expected_hash['name_with_namespace'] = project.name_with_namespace expected_hash['name_with_namespace'] = project.full_name
expected_hash['path_with_namespace'] = project.full_path expected_hash['path_with_namespace'] = project.full_path
expect(project.as_indexed_json).to eq(expected_hash) expect(project.as_indexed_json).to eq(expected_hash)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment