Browse Source

Merge branch 'develop' into standalone_develop

pull/347/head
yystopf 2 years ago
parent
commit
ac601b4b22
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      app/services/gitea/repository/entries/create_service.rb

+ 5
- 1
app/services/gitea/repository/entries/create_service.rb View File

@@ -59,7 +59,11 @@ class Gitea::Repository::Entries::CreateService < Gitea::ClientService
if @body[:new_branch].present? && (@body[:new_branch].include?('/') || @body[:new_branch].include?('\'') || @body[:new_branch].include?('^') || @body[:new_branch].include?('*'))
error("不合法的分支名称!")
else
error("#{filepath}文件已存在,不能重复创建!")
if json_parse!(body)["message"].present? && json_parse!(body)["message"].starts_with?("branch already exists")
error("#{@body[:new_branch]}分支已存在!")
else
error("#{filepath}文件已存在,不能重复创建!")
end
end
else
Rails.logger.error("Gitea api url==#{url},status:#{status},body=#{body}")


Loading…
Cancel
Save