Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKerri Miller <kerrizor@kerrizor.com>2019-09-05 16:01:36 +0300
committerNick Thomas <nick@gitlab.com>2019-09-05 16:01:36 +0300
commit0e40b41e224f18076426578da08548ae22afdcd1 (patch)
tree3bf58eb8e415771f28270910a66672b4d9db87b9 /app/services/protected_branches
parent95ef27253909ba7ff30667af14f7ea2256c1ae8d (diff)
Add structure to support EE feature of COAR
These are the structural changes for supporting the EE feature of moving "code_owner_approval_required" state from existing on a project to being on the protected branches individually, allowing for CODEOWNER validation on push events.
Diffstat (limited to 'app/services/protected_branches')
-rw-r--r--app/services/protected_branches/create_service.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/services/protected_branches/create_service.rb b/app/services/protected_branches/create_service.rb
index 87aaf4672a4..6b2836bba39 100644
--- a/app/services/protected_branches/create_service.rb
+++ b/app/services/protected_branches/create_service.rb
@@ -5,7 +5,8 @@ module ProtectedBranches
def execute(skip_authorization: false)
raise Gitlab::Access::AccessDeniedError unless skip_authorization || authorized?
- protected_branch.save
+ save_protected_branch
+
protected_branch
end
@@ -15,6 +16,10 @@ module ProtectedBranches
private
+ def save_protected_branch
+ protected_branch.save
+ end
+
def protected_branch
@protected_branch ||= project.protected_branches.new(params)
end