Skip to content

Commit

Permalink
Merge pull request github#29194 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Oct 16, 2023
2 parents 2a3f26c + f23c0f3 commit aee5ae9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Third-party systems can be observability systems, change management systems, cod

Use required reviewers to require a specific person or team to approve workflow jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.

{% ifversion deployments-prevent-self-approval %}You also have the option to prevent self-reviews for deployments to protected environments. If you enable this setting, users who initiate a deployment cannot approve the deployment job, even if they are a required reviewer. This ensures that deployments to protected environments are always reviewed by more than one person.{% endif %}

For more information on reviewing jobs that reference an environment with required reviewers, see "[AUTOTITLE](/actions/managing-workflow-runs/reviewing-deployments)."

{% ifversion fpt %}{% note %}
Expand Down Expand Up @@ -190,6 +192,7 @@ Variables stored in an environment are only available to workflow jobs that refe
1. Optionally, specify people or teams that must approve workflow jobs that use this environment. For more information, see "[Required reviewers](#required-reviewers)."
1. Select **Required reviewers**.
1. Enter up to 6 people or teams. Only one of the required reviewers needs to approve the job for it to proceed.
{% ifversion deployments-prevent-self-approval %}1. Optionally, to prevent users from approving workflows runs that they triggered, select **Prevent self-review**.{% endif %}
1. Click **Save protection rules**.
1. Optionally, specify the amount of time to wait before allowing workflow jobs that use this environment to proceed. For more information, see "[Wait timer](#wait-timer)."
1. Select **Wait timer**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ For more information about environments and required approvals, see "[AUTOTITLE]
- To approve the job, click **Approve and deploy**. Once a job is approved (and any other deployment protection rules have passed), the job will proceed. At this point, the job can access any secrets stored in the environment.
- To reject the job, click **Reject**. If a job is rejected, the workflow will fail.

{% ifversion deployments-prevent-self-approval %}{% note %}

**Note:** If the targeted environment is configured to prevent self-approvals for deployments, you will not be able to approve a deployment from a workflow run you initiated. For more information, see "[AUTOTITLE](/actions/deployment/targeting-different-environments/using-environments-for-deployment#required-reviewers)."

{% endnote %}{% endif %}

{% ifversion actions-break-glass %}

## Bypassing deployment protection rules
Expand Down
6 changes: 6 additions & 0 deletions data/features/deployments-prevent-self-approval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Reference: #12088
# Documentation for preventing self-review of deployments to protected environments
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.11'
2 changes: 1 addition & 1 deletion src/content-linter/scripts/lint-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ async function main() {
console.log('') // Just for some whitespace before the next message
console.log(
`Content linting found ${fixableFiles.length} ${pluralize(fixableFiles, 'file')} ` +
'that can be automatically fixed.\nTo apply the fixes run this command:\n',
'that can be automatically fixed.\nTo apply the fixes run this command and re-add the changed files:\n',
)
console.log(` npm run lint-content -- --fix --paths ${fixableFiles.join(' ')}\n`)
}
Expand Down

0 comments on commit aee5ae9

Please sign in to comment.