Skip to content

Commit

Permalink
fix: removes defunkt endpoints: `GET /repos/{owner}/{repo}/community/…
Browse files Browse the repository at this point in the history
…code_of_conduct`, `DELETE /reactions/{reaction_id}`. `encrypted_value` and `key_id` parameters are required for `.rest.actions.{createOrUpdateEnvironmentSecret,setSelectedReposForOrgSecret}()`. `access_token` parameter is required for `.rest.apps.deleteAuthorization()`. Previews graduated: `ant-man`, `flash`, `scarlet-witch`, `squirrel-girl` (#458)
  • Loading branch information
octokitbot committed Sep 30, 2021
1 parent cd2b8c3 commit 5f230f3
Show file tree
Hide file tree
Showing 15 changed files with 814 additions and 242 deletions.
8 changes: 5 additions & 3 deletions docs/actions/createOrUpdateEnvironmentSecret.md
@@ -1,6 +1,6 @@
---
name: Create or update an environment secret
example: octokit.rest.actions.createOrUpdateEnvironmentSecret({ repository_id, environment_name, secret_name })
example: octokit.rest.actions.createOrUpdateEnvironmentSecret({ repository_id, environment_name, secret_name, encrypted_value, key_id })
route: PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}
scope: actions
type: API method
Expand Down Expand Up @@ -88,6 +88,8 @@ octokit.rest.actions.createOrUpdateEnvironmentSecret({
repository_id,
environment_name,
secret_name,
encrypted_value,
key_id,
});
```

Expand Down Expand Up @@ -115,12 +117,12 @@ The name of the environment
secret_name parameter

</td></tr>
<tr><td>encrypted_value</td><td>no</td><td>
<tr><td>encrypted_value</td><td>yes</td><td>

Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint.

</td></tr>
<tr><td>key_id</td><td>no</td><td>
<tr><td>key_id</td><td>yes</td><td>

ID of the key you used to encrypt the secret.

Expand Down
5 changes: 3 additions & 2 deletions docs/actions/setSelectedReposForOrgSecret.md
@@ -1,6 +1,6 @@
---
name: Set selected repositories for an organization secret
example: octokit.rest.actions.setSelectedReposForOrgSecret({ org, secret_name })
example: octokit.rest.actions.setSelectedReposForOrgSecret({ org, secret_name, selected_repository_ids })
route: PUT /orgs/{org}/actions/secrets/{secret_name}/repositories
scope: actions
type: API method
Expand All @@ -14,6 +14,7 @@ Replaces all repositories for an organization secret when the `visibility` for r
octokit.rest.actions.setSelectedReposForOrgSecret({
org,
secret_name,
selected_repository_ids,
});
```

Expand All @@ -36,7 +37,7 @@ octokit.rest.actions.setSelectedReposForOrgSecret({
secret_name parameter

</td></tr>
<tr><td>selected_repository_ids</td><td>no</td><td>
<tr><td>selected_repository_ids</td><td>yes</td><td>

An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints.

Expand Down
5 changes: 3 additions & 2 deletions docs/apps/deleteAuthorization.md
@@ -1,6 +1,6 @@
---
name: Delete an app authorization
example: octokit.rest.apps.deleteAuthorization({ client_id })
example: octokit.rest.apps.deleteAuthorization({ client_id, access_token })
route: DELETE /applications/{client_id}/grant
scope: apps
type: API method
Expand All @@ -14,6 +14,7 @@ Deleting an OAuth application's grant will also delete all OAuth tokens associat
```js
octokit.rest.apps.deleteAuthorization({
client_id,
access_token,
});
```

Expand All @@ -33,7 +34,7 @@ octokit.rest.apps.deleteAuthorization({
The client ID of your GitHub app.

</td></tr>
<tr><td>access_token</td><td>no</td><td>
<tr><td>access_token</td><td>yes</td><td>

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

Expand Down
42 changes: 0 additions & 42 deletions docs/codesOfConduct/getForRepo.md

This file was deleted.

6 changes: 2 additions & 4 deletions docs/repos/createDeployment.md
Expand Up @@ -118,14 +118,12 @@ Short description of the deployment.
</td></tr>
<tr><td>transient_environment</td><td>no</td><td>

Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false`
**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false`

</td></tr>
<tr><td>production_environment</td><td>no</td><td>

Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise.
**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise.

</td></tr>
</tbody>
Expand Down
14 changes: 5 additions & 9 deletions docs/repos/createDeploymentStatus.md
Expand Up @@ -45,7 +45,7 @@ deployment_id parameter
</td></tr>
<tr><td>state</td><td>yes</td><td>

The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub.
The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub.

</td></tr>
<tr><td>target_url</td><td>no</td><td>
Expand All @@ -55,8 +55,7 @@ The target URL to associate with this status. This URL should contain output to
</td></tr>
<tr><td>log_url</td><td>no</td><td>

The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""`
**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""`

</td></tr>
<tr><td>description</td><td>no</td><td>
Expand All @@ -66,20 +65,17 @@ A short description of the status. The maximum description length is 140 charact
</td></tr>
<tr><td>environment</td><td>no</td><td>

Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type.
Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`.

</td></tr>
<tr><td>environment_url</td><td>no</td><td>

Sets the URL for accessing your environment. Default: `""`
**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
Sets the URL for accessing your environment. Default: `""`

</td></tr>
<tr><td>auto_inactive</td><td>no</td><td>

Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true`
**Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type.
**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type.
Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true`

</td></tr>
</tbody>
Expand Down
2 changes: 0 additions & 2 deletions docs/repos/get.md
Expand Up @@ -8,8 +8,6 @@ type: API method

# Get a repository

When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file.

The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.

```js
Expand Down
30 changes: 15 additions & 15 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
Expand Up @@ -24,7 +24,7 @@
"author": "Gregor Martynus (https://twitter.com/gr2m)",
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.31.1",
"@octokit/types": "^6.31.2",
"deprecation": "^2.3.1"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions scripts/update-endpoints/fetch-json.js
Expand Up @@ -20,6 +20,7 @@ const QUERY = `
url
isDeprecated
deprecationDate
removalDate
description
documentationUrl
previews(required: true) {
Expand Down

0 comments on commit 5f230f3

Please sign in to comment.