Skip to content

Commit d3c0e0a

Browse files
committed
docs: octokit.interactions.{getRestrictionsForYourPublicRepos,removeRestrictionsForYourPublicRepos,setRestrictionsForYourPublicRepos}
1 parent e7988d9 commit d3c0e0a

23 files changed

+110
-34
lines changed

docs/codeScanning/listAlertsForRepo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type: API method
88

99
# List code scanning alerts for a repository
1010

11-
Lists all open code scanning alerts for the default branch (usually `master`) and protected branches in a repository. For private repos, you must use an access token with the `repo` scope. For public repos, you must use an access token with `public_repo` and `repo:security_events` scopes. GitHub Apps must have the `security_events` read permission to use this endpoint.
11+
Lists all open code scanning alerts for the default branch (usually `main` or `master`). For private repos, you must use an access token with the `repo` scope. For public repos, you must use an access token with `public_repo` and `repo:security_events` scopes. GitHub Apps must have the `security_events` read permission to use this endpoint.
1212

1313
```js
1414
octokit.codeScanning.listAlertsForRepo({

docs/interactions/getRestrictionsForOrg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type: API method
88

99
# Get interaction restrictions for an organization
1010

11-
Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response.
11+
Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.
1212

1313
```js
1414
octokit.interactions.getRestrictionsForOrg({

docs/interactions/getRestrictionsForRepo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type: API method
88

99
# Get interaction restrictions for a repository
1010

11-
Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.
11+
Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.
1212

1313
```js
1414
octokit.interactions.getRestrictionsForRepo({
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Get interaction restrictions for your public repositories
3+
example: octokit.interactions.getRestrictionsForYourPublicRepos()
4+
route: GET /user/interaction-limits
5+
scope: interactions
6+
type: API method
7+
---
8+
9+
# Get interaction restrictions for your public repositories
10+
11+
Shows which type of GitHub user can interact with your public repositories and when the restriction expires. If there are no restrictions, you will see an empty response.
12+
13+
```js
14+
octokit.interactions.getRestrictionsForYourPublicRepos();
15+
```
16+
17+
## Parameters
18+
19+
This endpoint has no parameters
20+
21+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories).

docs/interactions/removeRestrictionsForRepo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type: API method
88

99
# Remove interaction restrictions for a repository
1010

11-
Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions.
11+
Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.
1212

1313
```js
1414
octokit.interactions.removeRestrictionsForRepo({
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Remove interaction restrictions from your public repositories
3+
example: octokit.interactions.removeRestrictionsForYourPublicRepos()
4+
route: DELETE /user/interaction-limits
5+
scope: interactions
6+
type: API method
7+
---
8+
9+
# Remove interaction restrictions from your public repositories
10+
11+
Removes any interaction restrictions from your public repositories.
12+
13+
```js
14+
octokit.interactions.removeRestrictionsForYourPublicRepos();
15+
```
16+
17+
## Parameters
18+
19+
This endpoint has no parameters
20+
21+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories).

docs/interactions/setRestrictionsForOrg.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type: API method
88

99
# Set interaction restrictions for an organization
1010

11-
Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions.
11+
Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.
1212

1313
```js
1414
octokit.interactions.setRestrictionsForOrg({
@@ -33,7 +33,12 @@ octokit.interactions.setRestrictionsForOrg({
3333
</td></tr>
3434
<tr><td>limit</td><td>yes</td><td>
3535

36-
Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`.
36+
The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`.
37+
38+
</td></tr>
39+
<tr><td>expiry</td><td>no</td><td>
40+
41+
The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`.
3742

3843
</td></tr>
3944
</tbody>

docs/interactions/setRestrictionsForRepo.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type: API method
88

99
# Set interaction restrictions for a repository
1010

11-
Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions.
11+
Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.
1212

1313
```js
1414
octokit.interactions.setRestrictionsForRepo({
@@ -37,7 +37,12 @@ octokit.interactions.setRestrictionsForRepo({
3737
</td></tr>
3838
<tr><td>limit</td><td>yes</td><td>
3939

40-
Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`.
40+
The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`.
41+
42+
</td></tr>
43+
<tr><td>expiry</td><td>no</td><td>
44+
45+
The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`.
4146

4247
</td></tr>
4348
</tbody>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Set interaction restrictions for your public repositories
3+
example: octokit.interactions.setRestrictionsForYourPublicRepos({ limit })
4+
route: PUT /user/interaction-limits
5+
scope: interactions
6+
type: API method
7+
---
8+
9+
# Set interaction restrictions for your public repositories
10+
11+
Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.
12+
13+
```js
14+
octokit.interactions.setRestrictionsForYourPublicRepos({
15+
limit,
16+
});
17+
```
18+
19+
## Parameters
20+
21+
<table>
22+
<thead>
23+
<tr>
24+
<th>name</th>
25+
<th>required</th>
26+
<th>description</th>
27+
</tr>
28+
</thead>
29+
<tbody>
30+
<tr><td>limit</td><td>yes</td><td>
31+
32+
The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`.
33+
34+
</td></tr>
35+
<tr><td>expiry</td><td>no</td><td>
36+
37+
The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`.
38+
39+
</td></tr>
40+
</tbody>
41+
</table>
42+
43+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories).

docs/repos/addAppAccessRestrictions.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ branch+ parameter
4949
</td></tr>
5050
<tr><td>apps</td><td>yes</td><td>
5151

52-
apps parameter
53-
5452
</td></tr>
5553
</tbody>
5654
</table>

0 commit comments

Comments
 (0)