fix conflict

This commit is contained in:
jasder 2021-03-28 19:56:11 +08:00
parent 63d91919ae
commit 0211d6152e
1 changed files with 7 additions and 4 deletions

View File

@ -11,7 +11,7 @@ class ProjectsController < ApplicationController
menu = []
menu.append(menu_hash_by_name("home"))
menu.append(menu_hash_by_name("code"))
menu.append(menu_hash_by_name("code")) if @project.has_menu_permission("code")
menu.append(menu_hash_by_name("issues")) if @project.has_menu_permission("issues")
menu.append(menu_hash_by_name("pulls")) if @project.has_menu_permission("pulls")
menu.append(menu_hash_by_name("devops")) if @project.has_menu_permission("devops")
@ -59,7 +59,10 @@ class ProjectsController < ApplicationController
end
def branches
@branches = @project.forge? ? Gitea::Repository::Branches::ListService.new(@owner, @project.identifier).call : []
return @branches = [] unless @project.forge?
result = Gitea::Repository::Branches::ListService.call(@owner, @project.identifier)
@branches = result.is_a?(Hash) && result.key?(:status) ? [] : result
end
def group_type_list