|
|
|
@@ -53,7 +53,7 @@ class Gitea::Repository::Entries::CreateService < Gitea::ClientService |
|
|
|
def status_payload(status, body) |
|
|
|
case status |
|
|
|
when 201 then success(json_parse!(body)) |
|
|
|
when 403 then error("你没有权限操作!") |
|
|
|
when 403 then error("你没有权限操作,请确认该分支是否是保护分支。") |
|
|
|
when 404 then error("你操作的链接不存在!") |
|
|
|
when 422 |
|
|
|
if @body[:new_branch].present? && (@body[:new_branch].include?('/') || @body[:new_branch].include?('\'') || @body[:new_branch].include?('^') || @body[:new_branch].include?('*')) |
|
|
|
|