{% extends "profile_base.html" %} {% set profile_nav_active = "teams" %} {% set profile_team_subnav_active = "repos" %} {% set profile_repo_subnav_active = "protections" %} {% block profile_content %}
{% with breadcrumbs=[ {"name": current_user.name | display_name(current_user.username), "href": "/profile"}, {"name": "Teams", "href": "/profile/teams"}, {"name": team.name, "href": "/profile/teams/" ~ team.uuid}, {"name": "Repos", "href": "/profile/teams/" ~ team.uuid ~ "/repos"}, {"name": repo.name, "href": "/profile/teams/" ~ team.uuid ~ "/repos/" ~ repo.uuid}, {"name": "Protections", "href": "/profile/teams/" ~ team.uuid ~ "/repos/" ~ repo.uuid ~ "/protections"}, {"name": form.branch_pattern if form.branch_pattern else "New"} ] %} {% include "partials/breadcrumbs.html" %} {% endwith %}
{% include "profile/team_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 (e.g. release/*).
Pushes to matching branches must go through a pull request. No direct pushes.
Number of approvals required before merge. 0 means approvals are not required.
Pull requests must contain exactly one commit.
Merges must be fast-forward. No merge commits.
Only the repo owner (creator or team 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_members | length > 0 %} Quick add: {% for member in team_members %} {% if not loop.last %}, {% endif %} {% endfor %} {% endif %}
{% if approvers | length == 0 %}

No trusted approvers configured. Any user can approve.

{% 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 %}