mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-07-16 23:18:56 +08:00
FIX code review
This commit is contained in:
@@ -19,5 +19,13 @@ module ProtectedBranches
|
||||
def save_protected_branch!
|
||||
protected_branch.save
|
||||
end
|
||||
|
||||
def save_gitea_protected_branch!
|
||||
@gitea_protected_branch ||= Gitea::Repository::ProtectedBranches::CreateService.call(@owner.login,
|
||||
@repository.identifier, gitea_protected_branch_params, @owner.gitea_token)
|
||||
|
||||
raise Error, @gitea_protected_branch[:message] unless gitea_protected_branch_saved?(@gitea_protected_branch)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user