Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typescript): description updates #352

Merged
merged 1 commit into from
Feb 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/apps/scopeToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ The ID of the user or organization to scope the user-to-server access token to.
</td></tr>
<tr><td>repositories</td><td>no</td><td>

The list of repository IDs to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified.
The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified.

</td></tr>
<tr><td>repository_ids</td><td>no</td><td>

The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified.
The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified.

</td></tr>
<tr><td>permissions</td><td>no</td><td>
Expand Down
50 changes: 0 additions & 50 deletions docs/repos/createAnEnvironment.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
---
name: Set protection rules for an environment
example: octokit.repos.setEnvironmentProtectionRules({ owner, repo, environment_name, deployment_branch_policy.protected_branches, deployment_branch_policy.custom_branch_policies })
name: Create or update an environment
example: octokit.repos.createOrUpdateEnvironment({ owner, repo, environment_name, deployment_branch_policy.protected_branches, deployment_branch_policy.custom_branch_policies })
route: PUT /repos/{owner}/{repo}/environments/{environment_name}
scope: repos
type: API method
---

# Set protection rules for an environment
# Create or update an environment

Set protection rules, such as required reviewers, for an environment. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."
Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."

**Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)."

**Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."

You must authenticate using an access token with the repo scope to use this endpoint.

```js
octokit.repos.setEnvironmentProtectionRules({
octokit.repos.createOrUpdateEnvironment({
owner,
repo,
environment_name,
Expand Down Expand Up @@ -53,7 +55,7 @@ The amount of time to delay a job after the job is initially triggered. The time
</td></tr>
<tr><td>reviewers</td><td>no</td><td>

The people or teams that may 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.
The people or teams that may review 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.

</td></tr>
<tr><td>reviewers[].type</td><td>no</td><td>
Expand Down Expand Up @@ -84,4 +86,4 @@ Whether only branches that match the specified name patterns can deploy to this
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/repos#set-protection-rules-for-an-environment).
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/repos#create-or-update-an-environment).
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"author": "Gregor Martynus (https://twitter.com/gr2m)",
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.11.0",
"@octokit/types": "^6.11.1",
"deprecation": "^2.3.1"
},
"devDependencies": {
Expand Down
Loading