Skip to content

Commit 0e5ea94

Browse files
authored
fix(typescript): description updates (#352)
1 parent 5118fc8 commit 0e5ea94

File tree

9 files changed

+212
-351
lines changed

9 files changed

+212
-351
lines changed

docs/apps/scopeToken.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ The ID of the user or organization to scope the user-to-server access token to.
4949
</td></tr>
5050
<tr><td>repositories</td><td>no</td><td>
5151

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

5454
</td></tr>
5555
<tr><td>repository_ids</td><td>no</td><td>
5656

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

5959
</td></tr>
6060
<tr><td>permissions</td><td>no</td><td>

docs/repos/createAnEnvironment.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

docs/repos/setEnvironmentProtectionRules.md renamed to docs/repos/createOrUpdateEnvironment.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
---
2-
name: Set protection rules for an environment
3-
example: octokit.repos.setEnvironmentProtectionRules({ owner, repo, environment_name, deployment_branch_policy.protected_branches, deployment_branch_policy.custom_branch_policies })
2+
name: Create or update an environment
3+
example: octokit.repos.createOrUpdateEnvironment({ owner, repo, environment_name, deployment_branch_policy.protected_branches, deployment_branch_policy.custom_branch_policies })
44
route: PUT /repos/{owner}/{repo}/environments/{environment_name}
55
scope: repos
66
type: API method
77
---
88

9-
# Set protection rules for an environment
9+
# Create or update an environment
1010

11-
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)."
11+
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)."
1212

1313
**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)."
1414

15+
**Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."
16+
1517
You must authenticate using an access token with the repo scope to use this endpoint.
1618

1719
```js
18-
octokit.repos.setEnvironmentProtectionRules({
20+
octokit.repos.createOrUpdateEnvironment({
1921
owner,
2022
repo,
2123
environment_name,
@@ -53,7 +55,7 @@ The amount of time to delay a job after the job is initially triggered. The time
5355
</td></tr>
5456
<tr><td>reviewers</td><td>no</td><td>
5557

56-
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.
58+
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.
5759

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

87-
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/repos#set-protection-rules-for-an-environment).
89+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/repos#create-or-update-an-environment).

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"author": "Gregor Martynus (https://twitter.com/gr2m)",
2525
"license": "MIT",
2626
"dependencies": {
27-
"@octokit/types": "^6.11.0",
27+
"@octokit/types": "^6.11.1",
2828
"deprecation": "^2.3.1"
2929
},
3030
"devDependencies": {

0 commit comments

Comments
 (0)