fix: merge from develop

This commit is contained in:
2022-05-20 17:06:00 +08:00
3 changed files with 33 additions and 17 deletions

View File

@@ -9,7 +9,10 @@ if @project.forge?
json.path entry['path']
json.type entry['type']
json.size entry['size']
is_readme = is_readme?(entry['type'], entry['name'])
if is_readme
json.replace_content readme_decode64_content(entry, @owner, @repository, @ref, @path)
end
json.content (direct_download || image_type || is_dir) ? nil : decode64_content(entry, @owner, @repository, @ref, @path)
json.target entry['target']
@@ -25,7 +28,7 @@ if @project.forge?
json.direct_download direct_download
json.image_type image_type
json.is_readme_file is_readme?(entry['type'], entry['name'])
json.is_readme_file is_readme
json.commit do
json.partial! 'last_commit', latest_commit: entry['latest_commit']
end