ADD protected branch Features

This commit is contained in:
Jasder
2020-12-03 15:24:40 +08:00
parent a24f0f8b45
commit 6a8ae5234b
40 changed files with 1252 additions and 11 deletions

View File

@@ -323,6 +323,34 @@ Rails.application.routes.draw do
end
end
# protected_branches
scope do
# get ':protected_branches/:action/:id/:user_id', constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
# post '/protected_branches' => 'protected_branches#create'
# delete '/protected_branches/:branch_name' => 'protected_branches#destroy',
# constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
# patch '/protected_branches/:branch_name' => 'protected_branches#update',
# constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
get(
'/protected_branches/',
to: 'protected_branches#index'
)
delete(
'/protected_branches/:branch_name',
to: 'protected_branches#destroy',
constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
)
post(
'/protected_branches',
to: 'protected_branches#create'
)
patch(
'/protected_branches/:branch_name',
to: 'protected_branches#update',
constraints: { branch_name: Forgeplus::Regex.git_reference_regex }
)
end
resources :issues do
collection do
get :commit_issues