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: remove legacy parameters from octokit.repos.createFork() again #375

Merged
merged 2 commits into from
Apr 21, 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
5 changes: 3 additions & 2 deletions docs/actions/createOrUpdateOrgSecret.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Create or update an organization secret
example: octokit.rest.actions.createOrUpdateOrgSecret({ org, secret_name })
example: octokit.rest.actions.createOrUpdateOrgSecret({ org, secret_name, visibility })
route: PUT /orgs/{org}/actions/secrets/{secret_name}
scope: actions
type: API method
Expand Down Expand Up @@ -87,6 +87,7 @@ puts Base64.strict_encode64(encrypted_secret)
octokit.rest.actions.createOrUpdateOrgSecret({
org,
secret_name,
visibility,
});
```

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

</td></tr>
<tr><td>visibility</td><td>no</td><td>
<tr><td>visibility</td><td>yes</td><td>

Configures the access that repositories have to the organization secret. Can be one of:
\- `all` - All repositories in an organization can access the secret.
Expand Down
11 changes: 4 additions & 7 deletions docs/actions/setAllowedActionsOrganization.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Set allowed actions for an organization
example: octokit.rest.actions.setAllowedActionsOrganization({ org, github_owned_allowed, verified_allowed, patterns_allowed })
example: octokit.rest.actions.setAllowedActionsOrganization({ org })
route: PUT /orgs/{org}/actions/permissions/selected-actions
scope: actions
type: API method
Expand All @@ -19,9 +19,6 @@ You must authenticate using an access token with the `admin:org` scope to use th
```js
octokit.rest.actions.setAllowedActionsOrganization({
org,
github_owned_allowed,
verified_allowed,
patterns_allowed,
});
```

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

</td></tr>
<tr><td>github_owned_allowed</td><td>yes</td><td>
<tr><td>github_owned_allowed</td><td>no</td><td>

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

</td></tr>
<tr><td>verified_allowed</td><td>yes</td><td>
<tr><td>verified_allowed</td><td>no</td><td>

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

</td></tr>
<tr><td>patterns_allowed</td><td>yes</td><td>
<tr><td>patterns_allowed</td><td>no</td><td>

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/*`."

Expand Down
11 changes: 4 additions & 7 deletions docs/actions/setAllowedActionsRepository.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Set allowed actions for a repository
example: octokit.rest.actions.setAllowedActionsRepository({ owner, repo, github_owned_allowed, verified_allowed, patterns_allowed })
example: octokit.rest.actions.setAllowedActionsRepository({ owner, repo })
route: PUT /repos/{owner}/{repo}/actions/permissions/selected-actions
scope: actions
type: API method
Expand All @@ -20,9 +20,6 @@ You must authenticate using an access token with the `repo` scope to use this en
octokit.rest.actions.setAllowedActionsRepository({
owner,
repo,
github_owned_allowed,
verified_allowed,
patterns_allowed,
});
```

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

</td></tr>
<tr><td>github_owned_allowed</td><td>yes</td><td>
<tr><td>github_owned_allowed</td><td>no</td><td>

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

</td></tr>
<tr><td>verified_allowed</td><td>yes</td><td>
<tr><td>verified_allowed</td><td>no</td><td>

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

</td></tr>
<tr><td>patterns_allowed</td><td>yes</td><td>
<tr><td>patterns_allowed</td><td>no</td><td>

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/*`."

Expand Down
4 changes: 2 additions & 2 deletions docs/apps/scopeToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: API method

# Create a scoped access token

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`.
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`.

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

**Required.** The OAuth access token used to authenticate to the GitHub API.
The OAuth access token used to authenticate to the GitHub API.

</td></tr>
<tr><td>target</td><td>no</td><td>
Expand Down
2 changes: 0 additions & 2 deletions docs/apps/updateWebhookConfigForApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ If provided, the `secret` will be used as the `key` to generate the HMAC hex dig
</td></tr>
<tr><td>insecure_ssl</td><td>no</td><td>

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.**

</td></tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions docs/codeScanning/deleteAnalysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ The procedure therefore consists of a nested loop:
**Inner loop**:

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

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.
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.

```js
octokit.rest.codeScanning.deleteAnalysis({
Expand Down
11 changes: 4 additions & 7 deletions docs/enterpriseAdmin/setAllowedActionsEnterprise.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Set allowed actions for an enterprise
example: octokit.rest.enterpriseAdmin.setAllowedActionsEnterprise({ enterprise, github_owned_allowed, verified_allowed, patterns_allowed })
example: octokit.rest.enterpriseAdmin.setAllowedActionsEnterprise({ enterprise })
route: PUT /enterprises/{enterprise}/actions/permissions/selected-actions
scope: enterpriseAdmin
type: API method
Expand All @@ -15,9 +15,6 @@ You must authenticate using an access token with the `admin:enterprise` scope to
```js
octokit.rest.enterpriseAdmin.setAllowedActionsEnterprise({
enterprise,
github_owned_allowed,
verified_allowed,
patterns_allowed,
});
```

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

</td></tr>
<tr><td>github_owned_allowed</td><td>yes</td><td>
<tr><td>github_owned_allowed</td><td>no</td><td>

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

</td></tr>
<tr><td>verified_allowed</td><td>yes</td><td>
<tr><td>verified_allowed</td><td>no</td><td>

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

</td></tr>
<tr><td>patterns_allowed</td><td>yes</td><td>
<tr><td>patterns_allowed</td><td>no</td><td>

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/*`."

Expand Down
18 changes: 10 additions & 8 deletions docs/git/createCommit.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Create a commit
example: octokit.rest.git.createCommit({ owner, repo, message, tree })
example: octokit.rest.git.createCommit({ owner, repo, message, tree, author.name, author.email })
route: POST /repos/{owner}/{repo}/git/commits
scope: git
type: API method
Expand Down Expand Up @@ -41,11 +41,13 @@ These are the possible values for `reason` in the `verification` object:

```js
octokit.rest.git.createCommit({
owner,
repo,
message,
tree,
});
owner,
repo,
message,
tree,
author.name,
author.email
})
```

## Parameters
Expand Down Expand Up @@ -85,12 +87,12 @@ The SHAs of the commits that were the parents of this commit. If omitted or empt
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.

</td></tr>
<tr><td>author.name</td><td>no</td><td>
<tr><td>author.name</td><td>yes</td><td>

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

</td></tr>
<tr><td>author.email</td><td>no</td><td>
<tr><td>author.email</td><td>yes</td><td>

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

Expand Down
22 changes: 12 additions & 10 deletions docs/git/createTag.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Create a tag object
example: octokit.rest.git.createTag({ owner, repo, tag, message, object, type })
example: octokit.rest.git.createTag({ owner, repo, tag, message, object, type, tagger.name, tagger.email })
route: POST /repos/{owner}/{repo}/git/tags
scope: git
type: API method
Expand Down Expand Up @@ -41,13 +41,15 @@ These are the possible values for `reason` in the `verification` object:

```js
octokit.rest.git.createTag({
owner,
repo,
tag,
message,
object,
type,
});
owner,
repo,
tag,
message,
object,
type,
tagger.name,
tagger.email
})
```

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

</td></tr>
<tr><td>tagger.name</td><td>no</td><td>
<tr><td>tagger.name</td><td>yes</td><td>

The name of the author of the tag

</td></tr>
<tr><td>tagger.email</td><td>no</td><td>
<tr><td>tagger.email</td><td>yes</td><td>

The email of the author of the tag

Expand Down
17 changes: 9 additions & 8 deletions docs/issues/addLabels.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Add labels to an issue
example: octokit.rest.issues.addLabels({ owner, repo, issue_number, labels })
example: octokit.rest.issues.addLabels({ owner, repo, issue_number, labels[].name })
route: POST /repos/{owner}/{repo}/issues/{issue_number}/labels
scope: issues
type: API method
Expand All @@ -10,11 +10,11 @@ type: API method

```js
octokit.rest.issues.addLabels({
owner,
repo,
issue_number,
labels,
});
owner,
repo,
issue_number,
labels[].name
})
```

## Parameters
Expand All @@ -39,9 +39,10 @@ octokit.rest.issues.addLabels({
issue_number parameter

</td></tr>
<tr><td>labels</td><td>yes</td><td>
<tr><td>labels</td><td>no</td><td>

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.
</td></tr>
<tr><td>labels[].name</td><td>yes</td><td>

</td></tr>
</tbody>
Expand Down
5 changes: 0 additions & 5 deletions docs/issues/setLabels.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ octokit.rest.issues.setLabels({

issue_number parameter

</td></tr>
<tr><td>labels</td><td>no</td><td>

The names of the labels to add to the issue. You can pass an empty array to remove all labels. **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.

</td></tr>
</tbody>
</table>
Expand Down
3 changes: 0 additions & 3 deletions docs/migrations/mapCommitAuthor.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ The new Git author email.

The new Git author name.

</td></tr>
<tr><td>remote_id</td><td>no</td><td>

</td></tr>
</tbody>
</table>
Expand Down
2 changes: 0 additions & 2 deletions docs/orgs/createWebhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ If provided, the `secret` will be used as the `key` to generate the HMAC hex dig
</td></tr>
<tr><td>config.insecure_ssl</td><td>no</td><td>

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.**

</td></tr>
<tr><td>config.username</td><td>no</td><td>

Expand Down
2 changes: 0 additions & 2 deletions docs/orgs/updateWebhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ If provided, the `secret` will be used as the `key` to generate the HMAC hex dig
</td></tr>
<tr><td>config.insecure_ssl</td><td>no</td><td>

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.**

</td></tr>
<tr><td>events</td><td>no</td><td>

Expand Down
2 changes: 0 additions & 2 deletions docs/orgs/updateWebhookConfigForOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ If provided, the `secret` will be used as the `key` to generate the HMAC hex dig
</td></tr>
<tr><td>insecure_ssl</td><td>no</td><td>

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.**

</td></tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion docs/packages/deletePackageForAuthenticatedUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: API method

# Delete a package for the authenticated user

Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance.
Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scope.
If `package_type` is not `container`, your token must also include the `repo` scope.
Expand Down
2 changes: 1 addition & 1 deletion docs/packages/deletePackageForOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: API method

# Delete a package for an organization

Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 25 downloads. In this scenario, contact GitHub support for further assistance.
Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition:

Expand Down
2 changes: 1 addition & 1 deletion docs/packages/deletePackageVersionForAuthenticatedUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: API method

# Delete a package version for the authenticated user

Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope.
If `package_type` is not `container`, your token must also include the `repo` scope.
Expand Down
2 changes: 1 addition & 1 deletion docs/packages/deletePackageVersionForOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type: API method

# Delete package version for an organization

Deletes a specific package version in an organization. If the package is public and the package version has more than 25 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` scope. In addition:

Expand Down
Loading