FIX 临时处理获取readme文件问题
This commit is contained in:
parent
00f5a7f916
commit
ffa74e92a3
|
@ -53,6 +53,11 @@ class RepositoriesController < ApplicationController
|
||||||
@entries = Gitea::Repository::Entries::ListService.new(@owner, @project.identifier, ref: @ref).call
|
@entries = Gitea::Repository::Entries::ListService.new(@owner, @project.identifier, ref: @ref).call
|
||||||
@entries = @entries.present? ? @entries.sort_by{ |hash| hash['type'] } : []
|
@entries = @entries.present? ? @entries.sort_by{ |hash| hash['type'] } : []
|
||||||
@path = Gitea.gitea_config[:domain]+"/#{@project.owner.login}/#{@project.identifier}/raw/branch/#{@ref}/"
|
@path = Gitea.gitea_config[:domain]+"/#{@project.owner.login}/#{@project.identifier}/raw/branch/#{@ref}/"
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
# 临时处理readme文件问题
|
||||||
|
admin = User.where(admin: true).last
|
||||||
|
@readme = Gitea::Repository::Readme::GetService.call(@owner.login, @project.identifier, @ref, admin&.gitea_token)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -59,4 +59,5 @@ if @project.forge?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
json.readme @readme
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue