Skip to content

Commit 072a195

Browse files
authored
fix: remove legacy parameters from octokit.repos.createFork() again (#375)
1 parent f62d5b8 commit 072a195

36 files changed

+437
-456
lines changed

docs/actions/createOrUpdateOrgSecret.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Create or update an organization secret
3-
example: octokit.rest.actions.createOrUpdateOrgSecret({ org, secret_name })
3+
example: octokit.rest.actions.createOrUpdateOrgSecret({ org, secret_name, visibility })
44
route: PUT /orgs/{org}/actions/secrets/{secret_name}
55
scope: actions
66
type: API method
@@ -87,6 +87,7 @@ puts Base64.strict_encode64(encrypted_secret)
8787
octokit.rest.actions.createOrUpdateOrgSecret({
8888
org,
8989
secret_name,
90+
visibility,
9091
});
9192
```
9293

@@ -119,7 +120,7 @@ Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/d
119120
ID of the key you used to encrypt the secret.
120121

121122
</td></tr>
122-
<tr><td>visibility</td><td>no</td><td>
123+
<tr><td>visibility</td><td>yes</td><td>
123124

124125
Configures the access that repositories have to the organization secret. Can be one of:
125126
\- `all` - All repositories in an organization can access the secret.

docs/actions/setAllowedActionsOrganization.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Set allowed actions for an organization
3-
example: octokit.rest.actions.setAllowedActionsOrganization({ org, github_owned_allowed, verified_allowed, patterns_allowed })
3+
example: octokit.rest.actions.setAllowedActionsOrganization({ org })
44
route: PUT /orgs/{org}/actions/permissions/selected-actions
55
scope: actions
66
type: API method
@@ -19,9 +19,6 @@ You must authenticate using an access token with the `admin:org` scope to use th
1919
```js
2020
octokit.rest.actions.setAllowedActionsOrganization({
2121
org,
22-
github_owned_allowed,
23-
verified_allowed,
24-
patterns_allowed,
2522
});
2623
```
2724

@@ -39,17 +36,17 @@ octokit.rest.actions.setAllowedActionsOrganization({
3936
<tr><td>org</td><td>yes</td><td>
4037

4138
</td></tr>
42-
<tr><td>github_owned_allowed</td><td>yes</td><td>
39+
<tr><td>github_owned_allowed</td><td>no</td><td>
4340

4441
Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization.
4542

4643
</td></tr>
47-
<tr><td>verified_allowed</td><td>yes</td><td>
44+
<tr><td>verified_allowed</td><td>no</td><td>
4845

4946
Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators.
5047

5148
</td></tr>
52-
<tr><td>patterns_allowed</td><td>yes</td><td>
49+
<tr><td>patterns_allowed</td><td>no</td><td>
5350

5451
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`."
5552

docs/actions/setAllowedActionsRepository.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Set allowed actions for a repository
3-
example: octokit.rest.actions.setAllowedActionsRepository({ owner, repo, github_owned_allowed, verified_allowed, patterns_allowed })
3+
example: octokit.rest.actions.setAllowedActionsRepository({ owner, repo })
44
route: PUT /repos/{owner}/{repo}/actions/permissions/selected-actions
55
scope: actions
66
type: API method
@@ -20,9 +20,6 @@ You must authenticate using an access token with the `repo` scope to use this en
2020
octokit.rest.actions.setAllowedActionsRepository({
2121
owner,
2222
repo,
23-
github_owned_allowed,
24-
verified_allowed,
25-
patterns_allowed,
2623
});
2724
```
2825

@@ -43,17 +40,17 @@ octokit.rest.actions.setAllowedActionsRepository({
4340
<tr><td>repo</td><td>yes</td><td>
4441

4542
</td></tr>
46-
<tr><td>github_owned_allowed</td><td>yes</td><td>
43+
<tr><td>github_owned_allowed</td><td>no</td><td>
4744

4845
Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization.
4946

5047
</td></tr>
51-
<tr><td>verified_allowed</td><td>yes</td><td>
48+
<tr><td>verified_allowed</td><td>no</td><td>
5249

5350
Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators.
5451

5552
</td></tr>
56-
<tr><td>patterns_allowed</td><td>yes</td><td>
53+
<tr><td>patterns_allowed</td><td>no</td><td>
5754

5855
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`."
5956

docs/apps/scopeToken.md

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

99
# Create a scoped access token
1010

11-
Exchanges a non-repository scoped user-to-server OAuth access token for a repository scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
11+
Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
1212

1313
```js
1414
octokit.rest.apps.scopeToken({
@@ -35,7 +35,7 @@ The client ID of your GitHub app.
3535
</td></tr>
3636
<tr><td>access_token</td><td>yes</td><td>
3737

38-
**Required.** The OAuth access token used to authenticate to the GitHub API.
38+
The OAuth access token used to authenticate to the GitHub API.
3939

4040
</td></tr>
4141
<tr><td>target</td><td>no</td><td>

docs/apps/updateWebhookConfigForApp.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ If provided, the `secret` will be used as the `key` to generate the HMAC hex dig
4444
</td></tr>
4545
<tr><td>insecure_ssl</td><td>no</td><td>
4646

47-
Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**
48-
4947
</td></tr>
5048
</tbody>
5149
</table>

docs/codeScanning/deleteAnalysis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ The procedure therefore consists of a nested loop:
7171
**Inner loop**:
7272

7373
- Delete the identified analysis.
74-
- Parse the response for the value of `next_analysis_url` and, if found, use this in the next iteration.
74+
- Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.
7575

76-
The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `next_analysis_url` value. Alternatively, you could use the `confirm_delete_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
76+
The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
7777

7878
```js
7979
octokit.rest.codeScanning.deleteAnalysis({

docs/enterpriseAdmin/setAllowedActionsEnterprise.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Set allowed actions for an enterprise
3-
example: octokit.rest.enterpriseAdmin.setAllowedActionsEnterprise({ enterprise, github_owned_allowed, verified_allowed, patterns_allowed })
3+
example: octokit.rest.enterpriseAdmin.setAllowedActionsEnterprise({ enterprise })
44
route: PUT /enterprises/{enterprise}/actions/permissions/selected-actions
55
scope: enterpriseAdmin
66
type: API method
@@ -15,9 +15,6 @@ You must authenticate using an access token with the `admin:enterprise` scope to
1515
```js
1616
octokit.rest.enterpriseAdmin.setAllowedActionsEnterprise({
1717
enterprise,
18-
github_owned_allowed,
19-
verified_allowed,
20-
patterns_allowed,
2118
});
2219
```
2320

@@ -37,17 +34,17 @@ octokit.rest.enterpriseAdmin.setAllowedActionsEnterprise({
3734
The slug version of the enterprise name. You can also substitute this value with the enterprise id.
3835

3936
</td></tr>
40-
<tr><td>github_owned_allowed</td><td>yes</td><td>
37+
<tr><td>github_owned_allowed</td><td>no</td><td>
4138

4239
Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization.
4340

4441
</td></tr>
45-
<tr><td>verified_allowed</td><td>yes</td><td>
42+
<tr><td>verified_allowed</td><td>no</td><td>
4643

4744
Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators.
4845

4946
</td></tr>
50-
<tr><td>patterns_allowed</td><td>yes</td><td>
47+
<tr><td>patterns_allowed</td><td>no</td><td>
5148

5249
Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`."
5350

docs/git/createCommit.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Create a commit
3-
example: octokit.rest.git.createCommit({ owner, repo, message, tree })
3+
example: octokit.rest.git.createCommit({ owner, repo, message, tree, author.name, author.email })
44
route: POST /repos/{owner}/{repo}/git/commits
55
scope: git
66
type: API method
@@ -41,11 +41,13 @@ These are the possible values for `reason` in the `verification` object:
4141

4242
```js
4343
octokit.rest.git.createCommit({
44-
owner,
45-
repo,
46-
message,
47-
tree,
48-
});
44+
owner,
45+
repo,
46+
message,
47+
tree,
48+
author.name,
49+
author.email
50+
})
4951
```
5052

5153
## Parameters
@@ -85,12 +87,12 @@ The SHAs of the commits that were the parents of this commit. If omitted or empt
8587
Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details.
8688

8789
</td></tr>
88-
<tr><td>author.name</td><td>no</td><td>
90+
<tr><td>author.name</td><td>yes</td><td>
8991

9092
The name of the author (or committer) of the commit
9193

9294
</td></tr>
93-
<tr><td>author.email</td><td>no</td><td>
95+
<tr><td>author.email</td><td>yes</td><td>
9496

9597
The email of the author (or committer) of the commit
9698

docs/git/createTag.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Create a tag object
3-
example: octokit.rest.git.createTag({ owner, repo, tag, message, object, type })
3+
example: octokit.rest.git.createTag({ owner, repo, tag, message, object, type, tagger.name, tagger.email })
44
route: POST /repos/{owner}/{repo}/git/tags
55
scope: git
66
type: API method
@@ -41,13 +41,15 @@ These are the possible values for `reason` in the `verification` object:
4141

4242
```js
4343
octokit.rest.git.createTag({
44-
owner,
45-
repo,
46-
tag,
47-
message,
48-
object,
49-
type,
50-
});
44+
owner,
45+
repo,
46+
tag,
47+
message,
48+
object,
49+
type,
50+
tagger.name,
51+
tagger.email
52+
})
5153
```
5254

5355
## Parameters
@@ -92,12 +94,12 @@ The type of the object we're tagging. Normally this is a `commit` but it can als
9294
An object with information about the individual creating the tag.
9395

9496
</td></tr>
95-
<tr><td>tagger.name</td><td>no</td><td>
97+
<tr><td>tagger.name</td><td>yes</td><td>
9698

9799
The name of the author of the tag
98100

99101
</td></tr>
100-
<tr><td>tagger.email</td><td>no</td><td>
102+
<tr><td>tagger.email</td><td>yes</td><td>
101103

102104
The email of the author of the tag
103105

docs/issues/addLabels.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Add labels to an issue
3-
example: octokit.rest.issues.addLabels({ owner, repo, issue_number, labels })
3+
example: octokit.rest.issues.addLabels({ owner, repo, issue_number, labels[].name })
44
route: POST /repos/{owner}/{repo}/issues/{issue_number}/labels
55
scope: issues
66
type: API method
@@ -10,11 +10,11 @@ type: API method
1010

1111
```js
1212
octokit.rest.issues.addLabels({
13-
owner,
14-
repo,
15-
issue_number,
16-
labels,
17-
});
13+
owner,
14+
repo,
15+
issue_number,
16+
labels[].name
17+
})
1818
```
1919

2020
## Parameters
@@ -39,9 +39,10 @@ octokit.rest.issues.addLabels({
3939
issue_number parameter
4040

4141
</td></tr>
42-
<tr><td>labels</td><td>yes</td><td>
42+
<tr><td>labels</td><td>no</td><td>
4343

44-
The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key.
44+
</td></tr>
45+
<tr><td>labels[].name</td><td>yes</td><td>
4546

4647
</td></tr>
4748
</tbody>

0 commit comments

Comments
 (0)