{% extends "base.html" %} {% set staff_repo_subnav_active = "protections" %} {% block content %}
{% with staff_nav_active="repos" %} {% include "partials/staff_sidebar.html" %} {% endwith %}
{% with breadcrumbs=[ {"name": "Staff", "href": "/staff"}, {"name": "Repos", "href": "/staff/repos"}, {"name": repo.name, "href": "/staff/repos/" ~ repo.uuid}, {"name": "Protections", "href": "/staff/repos/" ~ repo.uuid ~ "/protections"}, {"name": form.branch_pattern if form.branch_pattern else "New"} ] %} {% include "partials/breadcrumbs.html" %} {% endwith %}
{% include "staff/repo_subnav.html" %} {% include "partials/flash.html" %}
{% if is_new %}New Branch Protection{% else %}Edit Branch Protection{% endif %}
Glob pattern matching branch names. Use * as a wildcard (for example release/*).
Pushes to matching branches must go through a pull request.
Number of approvals required before merge. 0 disables approval requirements.
Pull requests must contain exactly one commit.
Merges must be fast-forward only.
Only the effective repo owner can merge.
Allow the repo owner (creator or team owner) to bypass approvals, single-commit, fast-forward, and owner-merge checks.
Cancel
{% if not is_new %}
Trusted Approvers
{% if team %} {% if team_members | length > 0 %} Quick add: {% for member in team_members %} {% if not loop.last %}, {% endif %} {% endfor %} {% else %} Approvers for team repos must be active team members. {% endif %} {% else %} Any active user can be added as an approver for personal repos. {% endif %}
{% if approvers | length == 0 %}

No trusted approvers configured.

{% else %}
{% for approver in approvers %} {% endfor %}
User Actions
{% with user_link_href = "/" ~ approver.username, user_link_username = approver.username, user_link_label = approver.username, user_link_class = "text-decoration-none" %} {% include "partials/hover_card_user_link.html" %} {% endwith %}
{% endif %}
{% endif %}
{% with modal_id="confirm-remove-approver", modal_title="Remove approver", modal_body='Remove from trusted approvers?', modal_confirm_text="Remove approver", modal_desc="This user will no longer satisfy the trusted approver requirement." %} {% include "partials/confirm_modal.html" %} {% endwith %} {% endblock %} {% block scripts %} {% endblock %}