Skip to content

Commit

Permalink
Merge pull request #16819 from github/repo-sync
Browse files Browse the repository at this point in the history
repo sync
  • Loading branch information
Octomerger authored Apr 4, 2022
2 parents 72e3284 + 9c61e7b commit c9e3031
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ For each branch protection rule, you can choose to enable or disable the followi
{% ifversion fpt or ghec %}
- [Require merge queue](#require-merge-queue)
{% endif %}
{%- if required-deployments %}
- [Require deployments to succeed before merging](#require-deployments-to-succeed-before-merging)
{%- endif %}
- [Include administrators](#include-administrators)
- [Restrict who can push to matching branches](#restrict-who-can-push-to-matching-branches)
- [Allow force pushes](#allow-force-pushes)
Expand Down Expand Up @@ -143,6 +146,11 @@ Before you can require a linear commit history, your repository must allow squas
{% data reusables.pull_requests.merge-queue-references %}

{% endif %}

### Require deployments to succeed before merging

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.

### Include administrators

By default, protected branch rules do not apply to people with admin permissions to a repository. You can enable this setting to include administrators in your protected branch rules.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ When you create a branch rule, the branch you specify doesn't have to exist yet

{% endtip %}
{%- endif %}
{%- if required-deployments %}
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 %}
1. Optionally, select **Apply the rules above to administrators**.
![Apply the rules above to administrators checkbox](/assets/images/help/repository/include-admins-protected-branches.png)
1. Optionally,{% ifversion fpt or ghec %} if your repository is owned by an organization using {% data variables.product.prodname_team %} or {% data variables.product.prodname_ghe_cloud %},{% endif %} enable branch restrictions.
Expand Down
7 changes: 7 additions & 0 deletions data/features/required-deployments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Issue 6384
# Required deployments branch protection rule
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.5'
ghae: 'issue-6384'

0 comments on commit c9e3031

Please sign in to comment.