mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 20:25:45 +08:00
修复
This commit is contained in:
@@ -15,10 +15,11 @@ class Api::V1::Projects::Branches::ListService < ApplicationService
|
||||
|
||||
def call
|
||||
load_gitea_data
|
||||
|
||||
gitea_data["default_branch"] = gitea_repo_data["default_branch"]
|
||||
load_default_branch
|
||||
|
||||
gitea_data
|
||||
@gitea_data[:default_branch] = @gitea_repo_data["default_branch"]
|
||||
|
||||
@gitea_data
|
||||
end
|
||||
|
||||
private
|
||||
@@ -39,7 +40,7 @@ class Api::V1::Projects::Branches::ListService < ApplicationService
|
||||
end
|
||||
|
||||
def load_default_branch
|
||||
@gitea_repo_data = $gitea_client.get_repos_by_owner_repo('yystopf', 'pig') rescue nil
|
||||
@gitea_repo_data = $gitea_client.get_repos_by_owner_repo(owner, repo) rescue nil
|
||||
raise Error, '获取仓库信息失败!' unless @gitea_data.is_a?(Hash)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user