BIN
assets/images/help/repository/lock-branch-forksync.png
Normal file
BIN
assets/images/help/repository/lock-branch-forksync.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
BIN
assets/images/help/repository/lock-branch.png
Normal file
BIN
assets/images/help/repository/lock-branch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 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.
|
||||

|
||||
{%- endif %}
|
||||
{% ifversion lock-branch %}
|
||||
1. Optionally, select **Lock branch** to make branch read-only.
|
||||

|
||||
- Optionally, to allow fork syncing, select **Allow fork syncing**.
|
||||

|
||||
{%- endif %}
|
||||
1. Optionally, select {% ifversion bypass-branch-protections %}**Do not allow bypassing the above settings**.
|
||||
{% else %}**Apply the rules above to administrators**.
|
||||
{% endif %}
|
||||
|
||||
7
data/features/lock-branch.yml
Normal file
7
data/features/lock-branch.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
# Reference: #8288
|
||||
# Documentation for locking branch with protected branch rule.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.8'
|
||||
ghae: '>= 3.8'
|
||||
Reference in New Issue
Block a user