Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com>
This commit is contained in:
Patrick Knight 2023-02-08 11:36:28 -06:00 коммит произвёл GitHub
Родитель 04aa850d05
Коммит f99984e4f3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 14 добавлений и 4 удалений

Просмотреть файл

@ -111,6 +111,9 @@ For more information, see "[{% data variables.product.prodname_discussions %}](/
{%- ifversion bypass-branch-protections %}
- Bypass branch protections
{%- endif %}
{%- ifversion edit-repository-rules %}
- Edit repository rules
{%- endif %}
### Security

Просмотреть файл

@ -56,7 +56,7 @@ Now when you merge the `feature2` pull request, it'll be merged into the `main`
## Working with protected branches
Repository administrators can enable protections on a branch. If you're working on a branch that's protected, you won't be able to delete or force push to the branch. Repository administrators can additionally enable several other protected branch settings to enforce various workflows before a branch can be merged.
Repository administrators {% ifversion edit-repository-rules %}or custom roles with the "edit repository rules" permission {% endif %}can enable protections on a branch. If you're working on a branch that's protected, you won't be able to delete or force push to the branch. Repository administrators can additionally enable several other protected branch settings to enforce various workflows before a branch can be merged.
{% note %}

Просмотреть файл

@ -23,7 +23,7 @@ versions:
ghes: '*'
ghae: '*'
ghec: '*'
permissions: People with admin permissions to a repository can manage branch protection rules.
permissions: People with admin permissions {% ifversion edit-repository-rules %}or a custom role with the "edit repository rules" permission{% endif %} to a repository can manage branch protection rules.
topics:
- Repositories
shortTitle: Branch protection rule

Просмотреть файл

@ -16,7 +16,7 @@ versions:
{% endnote %}
When you add a tag protection rule, all tags that match the pattern provided will be protected. Only users with admin or maintain permissions in the repository will be able to create protected tags, and only users with admin permissions in the repository will be able to delete protected tags. For more information, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role)." {% data variables.product.prodname_github_apps %} require the `Repository administration: write` permission to modify a protected tag.
When you add a tag protection rule, all tags that match the pattern provided will be protected. Only users with admin or maintain permissions{% ifversion edit-repository-rules %}, or custom roles with the "edit repository rules" permission{% endif %} in the repository will be able to create protected tags, and only users with admin permissions{% ifversion edit-repository-rules %} or custom roles with the "edit repository rules" permission{% endif %} in the repository will be able to delete protected tags. For more information, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role)." {% data variables.product.prodname_github_apps %} require the `Repository administration: write` permission to modify a protected tag.
{% ifversion custom-repository-roles %}
Additionally, you can create custom repository roles to allow other groups of users to create or delete tags that match tag protection rules. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)."{% endif %}

Просмотреть файл

@ -0,0 +1,7 @@
# Issue: 9290
# Description: Allows for creating, editing and deleting branch protection rules.
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.9'
ghae: '>=3.9'

Просмотреть файл

@ -1 +1 @@
Repository administrators can require that all pull requests receive a specific number of approving reviews before someone merges the pull request into a protected branch. You can require approving reviews from people with write permissions in the repository or from a designated code owner.
Repository administrators{% ifversion edit-repository-rules %} or custom roles with the "edit repository rules" permission{% endif %} can require that all pull requests receive a specific number of approving reviews before someone merges the pull request into a protected branch. You can require approving reviews from people with write permissions in the repository or from a designated code owner.