debian-mirror-gitlab/app/views/projects/protected_branches/shared/_index.html.haml

24 lines
1.1 KiB
Text
Raw Normal View History

2019-07-31 22:56:46 +05:30
- expanded = expanded_by_default?
2017-09-10 17:25:29 +05:30
2020-10-24 23:57:45 +05:30
%section.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_branches_settings_content' } }
2017-09-10 17:25:29 +05:30
.settings-header
%h4
2021-03-11 19:13:27 +05:30
Protected branches
2018-10-15 14:42:47 +05:30
%button.btn.js-settings-toggle.qa-expand-protected-branches{ type: 'button' }
2017-09-10 17:25:29 +05:30
= expanded ? 'Collapse' : 'Expand'
%p
2021-03-08 18:12:59 +05:30
Keep stable branches secure, and force developers to use merge requests. #{link_to "What are protected branches?", help_page_path("user/project/protected_branches")}
2018-03-17 18:26:18 +05:30
.settings-content
2017-09-10 17:25:29 +05:30
%p
2021-03-08 18:12:59 +05:30
By default, protected branches protect your code and:
2017-09-10 17:25:29 +05:30
%ul
2021-03-08 18:12:59 +05:30
%li Allow only users with Maintainer #{link_to "permissions", help_page_path("user/permissions")} to create new protected branches.
%li Allow only users with Maintainer permissions to push code.
%li Prevent <strong>anyone</strong> from force-pushing to the branch.
%li Prevent <strong>anyone</strong> from deleting the branch.
2017-09-10 17:25:29 +05:30
- if can? current_user, :admin_project, @project
= content_for :create_protected_branch
= content_for :branches_list