fix: merge from develop

This commit is contained in:
2021-07-12 17:28:47 +08:00
6 changed files with 85 additions and 10 deletions

View File

@@ -83,3 +83,4 @@ json.diff do
end
end
json.message @merge_message

View File

@@ -2,6 +2,6 @@ json.total_count @owners.size
json.owners @owners.each do |owner|
json.id owner.id
json.type owner.type
json.name owner.login
json.name owner&.show_real_name
json.avatar_url url_to_avatar(owner)
end

View File

@@ -11,7 +11,16 @@ if @project.forge?
json.content decode64_content(entry, @owner, @repository, @ref)
json.target entry['target']
json.download_url entry['download_url']
download_url =
if image_type
dir_path = [@owner.login, @repository.identifier, "raw/branch", @ref].join('/')
render_download_image_url(dir_path, entry['path'], decode64_content(entry, @owner, @repository, @ref))
else
entry['download_url']
end
json.download_url download_url
json.direct_download direct_download
json.image_type image_type
json.is_readme_file is_readme?(entry['type'], entry['name'])