_index.html.haml 1.12 KB
Newer Older
1 2
- expanded = Rails.env.test?

3
%section.qa-protected-branches-settings.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded) }
4 5 6
  .settings-header
    %h4
      Protected Branches
7
    %button.btn.js-settings-toggle.qa-expand-protected-branches{ type: 'button' }
8 9 10
      = expanded ? 'Collapse' : 'Expand'
    %p
      Keep stable branches secure and force developers to use merge requests.
11
  .settings-content
12 13 14
    %p
      By default, protected branches are designed to:
      %ul
15
        %li prevent their creation, if not already created, from everybody except users who are allowed to merge
Mark Chao's avatar
Mark Chao committed
16
        %li prevent pushes from everybody except Maintainers
17 18
        %li prevent <strong>anyone</strong> from force pushing to the branch
        %li prevent <strong>anyone</strong> from deleting the branch
19
      %p Read more about #{link_to "protected branches", help_page_path("user/project/protected_branches")} and #{link_to "project permissions", help_page_path("user/permissions")}.
20 21 22 23 24

    - if can? current_user, :admin_project, @project
      = content_for :create_protected_branch

    = content_for :branches_list