зеркало из https://github.com/github/docs.git
Documentation update and screenshot for Lock Branch branch protection (#31739)
Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com> Co-authored-by: David Staheli <1767415+davidstaheli@users.noreply.github.com>
This commit is contained in:
Родитель
63da783388
Коммит
4ced151df1
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 9.4 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 4.7 KiB |
|
@ -54,6 +54,9 @@ For each branch protection rule, you can choose to enable or disable the followi
|
|||
{%- ifversion required-deployments %}
|
||||
- [Require deployments to succeed before merging](#require-deployments-to-succeed-before-merging)
|
||||
{%- endif %}
|
||||
{%- ifversion lock-branch %}
|
||||
- [Lock branch](#lock-branch)
|
||||
{%- endif %}
|
||||
{% ifversion bypass-branch-protections %}- [Do not allow bypassing the above settings](#do-not-allow-bypassing-the-above-settings){% else %}- [Include administrators](#include-administrators){% endif %}
|
||||
- [Restrict who can push to matching branches](#restrict-who-can-push-to-matching-branches)
|
||||
- [Allow force pushes](#allow-force-pushes)
|
||||
|
@ -155,6 +158,13 @@ Before you can require a linear commit history, your repository must allow squas
|
|||
|
||||
You can require that changes are successfully deployed to specific environments before a branch can be merged. For example, you can use this rule to ensure that changes are successfully deployed to a staging environment before the changes merge to your default branch.
|
||||
|
||||
{% ifversion lock-branch %}
|
||||
### Lock branch
|
||||
|
||||
Locking a branch ensures that no commits can be made to the branch.
|
||||
By default, a forked repository does not support syncing from its upstream repository. You can enable **Allow fork syncing** to pull changes from the upstream repository while preventing other contributions to the fork's branch.
|
||||
{% endif %}
|
||||
|
||||
{% ifversion bypass-branch-protections %}### Do not allow bypassing the above settings{% else %}
|
||||
### Include administrators{% endif %}
|
||||
|
||||
|
|
|
@ -103,6 +103,12 @@ When you create a branch rule, the branch you specify doesn't have to exist yet
|
|||
1. Optionally, to choose which environments the changes must be successfully deployed to before merging, select **Require deployments to succeed before merging**, then select the environments.
|
||||
![Require successful deployment option](/assets/images/help/repository/require-successful-deployment.png)
|
||||
{%- endif %}
|
||||
{% ifversion lock-branch %}
|
||||
1. Optionally, select **Lock branch** to make branch read-only.
|
||||
![Screenshot of the checkbox to lock a branch](/assets/images/help/repository/lock-branch.png)
|
||||
- Optionally, to allow fork syncing, select **Allow fork syncing**.
|
||||
![Screenshot of the checkbox to allow fork syncing](/assets/images/help/repository/lock-branch-forksync.png)
|
||||
{%- endif %}
|
||||
1. Optionally, select {% ifversion bypass-branch-protections %}**Do not allow bypassing the above settings**.
|
||||
![Do not allow bypassing the above settings checkbox](/assets/images/help/repository/do-not-allow-bypassing-the-above-settings.png){% else %}**Apply the rules above to administrators**.
|
||||
![Apply the rules above to administrators checkbox](/assets/images/help/repository/include-admins-protected-branches.png){% endif %}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# Reference: #8288
|
||||
# Documentation for locking branch with protected branch rule.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.8'
|
||||
ghae: '>= 3.8'
|
Загрузка…
Ссылка в новой задаче