|
|
|
@@ -86,7 +86,7 @@ class Api::V1::Projects::Contents::BatchCreateService < ApplicationService |
|
|
|
result = $gitea_client.get_repos_branch_name_set_by_owner_repo(owner, repo, {query: request_params} ) rescue nil |
|
|
|
raise Error, '查询分支名称失败!' unless result.is_a?(Hash) |
|
|
|
raise Error, '分支不存在!' unless result['branch_name'].include?(branch) |
|
|
|
raise Error, '分支已存在!' if result['branch_name'].include?(new_branch) && new_branch.nil? |
|
|
|
raise Error, '分支已存在!' if result['branch_name'].include?(new_branch) && !new_branch.nil? |
|
|
|
end |
|
|
|
|
|
|
|
end |