mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
修复:删除特殊符号分支、标签失败
This commit is contained in:
@@ -32,7 +32,7 @@ class Api::V1::Projects::Branches::DeleteService < ApplicationService
|
|||||||
|
|
||||||
def excute_data_to_gitea
|
def excute_data_to_gitea
|
||||||
begin
|
begin
|
||||||
@gitea_data = $gitea_client.delete_repos_branches_by_owner_repo_branch(owner, repo, branch_name, {query: request_params})
|
@gitea_data = $gitea_client.delete_repos_branches_by_owner_repo_branch(owner, repo, CGI.escape(branch_name), {query: request_params})
|
||||||
rescue => e
|
rescue => e
|
||||||
raise Error, '保护分支无法删除!' if e.to_s.include?("branch protected")
|
raise Error, '保护分支无法删除!' if e.to_s.include?("branch protected")
|
||||||
raise Error, '删除分支失败!'
|
raise Error, '删除分支失败!'
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class Api::V1::Projects::Tags::DeleteService < ApplicationService
|
|||||||
|
|
||||||
def excute_data_to_gitea
|
def excute_data_to_gitea
|
||||||
begin
|
begin
|
||||||
@gitea_data = $gitea_client.delete_repos_tags_by_owner_repo_tag(owner, repo, tag_name, {query: request_params})
|
@gitea_data = $gitea_client.delete_repos_tags_by_owner_repo_tag(owner, repo, CGI.escape(tag_name), {query: request_params})
|
||||||
rescue => e
|
rescue => e
|
||||||
raise Error, '请先删除发行版!' if e.to_s.include?("409")
|
raise Error, '请先删除发行版!' if e.to_s.include?("409")
|
||||||
raise Error, '删除标签失败!'
|
raise Error, '删除标签失败!'
|
||||||
|
|||||||
Reference in New Issue
Block a user