mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
fix: branches use branch name api
This commit is contained in:
@@ -82,8 +82,9 @@ class ProjectsController < ApplicationController
|
||||
def branches
|
||||
return @branches = [] unless @project.forge?
|
||||
|
||||
result = Gitea::Repository::Branches::ListService.call(@owner, @project.identifier)
|
||||
@branches = result.is_a?(Hash) && result.key?(:status) ? [] : result
|
||||
# result = Gitea::Repository::Branches::ListService.call(@owner, @project.identifier)
|
||||
result = Gitea::Repository::Branches::ListNameService.call(@owner, @project.identifier)
|
||||
@branches = result.is_a?(Hash) ? (result.key?(:status) ? [] : result["branch_name"]) : result
|
||||
end
|
||||
|
||||
def branches_slice
|
||||
|
||||
Reference in New Issue
Block a user