Deprecate code for Project. Use title and path
This commit is contained in:
parent
ab9d023651
commit
c50ec72b52
22 changed files with 79 additions and 83 deletions
|
@ -114,7 +114,7 @@ module PushObserver
|
|||
id: commit.id,
|
||||
message: commit.safe_message,
|
||||
timestamp: commit.date.xmlschema,
|
||||
url: "#{Gitlab.config.url}/#{code}/commits/#{commit.id}",
|
||||
url: "#{Gitlab.config.url}/#{path}/commits/#{commit.id}",
|
||||
author: {
|
||||
name: commit.author_name,
|
||||
email: commit.author_email
|
||||
|
|
|
@ -87,7 +87,7 @@ module Repository
|
|||
end
|
||||
|
||||
def namespace_dir
|
||||
namespace.try(:code) || ''
|
||||
namespace.try(:path) || ''
|
||||
end
|
||||
|
||||
def update_repository
|
||||
|
@ -164,12 +164,12 @@ module Repository
|
|||
return nil unless commit
|
||||
|
||||
# Build file path
|
||||
file_name = self.code + "-" + commit.id.to_s + ".tar.gz"
|
||||
storage_path = Rails.root.join("tmp", "repositories", self.code)
|
||||
file_name = self.path + "-" + commit.id.to_s + ".tar.gz"
|
||||
storage_path = Rails.root.join("tmp", "repositories", self.path)
|
||||
file_path = File.join(storage_path, file_name)
|
||||
|
||||
# Put files into a directory before archiving
|
||||
prefix = self.code + "/"
|
||||
prefix = self.path + "/"
|
||||
|
||||
# Create file if not exists
|
||||
unless File.exists?(file_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue