Skip to content
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
28 changes: 23 additions & 5 deletions docs/actions/createOrUpdateSecretForRepo.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
---
name: Delete a repository secret
name: Create or update a repository secret
example: octokit.actions.createOrUpdateSecretForRepo({ owner, repo, secret_name })
route: DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}
route: PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}
scope: actions
type: API method
---

# Delete a repository secret
# Create or update a repository secret

**Deprecated:** This method has been renamed to actions.createOrUpdateRepoSecret

Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
Creates or updates a repository secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.

Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.

Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.

Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.

Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.

```js
octokit.actions.createOrUpdateSecretForRepo({
Expand Down Expand Up @@ -39,11 +47,21 @@ octokit.actions.createOrUpdateSecretForRepo({
</td></tr>
<tr><td>secret_name</td><td>yes</td><td>

</td></tr>
<tr><td>encrypted_value</td><td>no</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 a repository public key](https://developer.github.com/v3/actions/secrets/#get-a-repository-public-key) endpoint.

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

ID of the key you used to encrypt the secret.

</td></tr>
<tr><td>name</td><td>no</td><td>

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/secrets/#delete-a-repository-secret).
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/secrets/#create-or-update-a-repository-secret).
49 changes: 49 additions & 0 deletions docs/actions/deleteSecretFromRepo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Delete a repository secret
example: octokit.actions.deleteSecretFromRepo({ owner, repo, secret_name })
route: DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}
scope: actions
type: API method
---

# Delete a repository secret

**Deprecated:** This method has been renamed to actions.deleteRepoSecret

Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.

```js
octokit.actions.deleteSecretFromRepo({
owner,
repo,
secret_name,
});
```

## Parameters

<table>
<thead>
<tr>
<th>name</th>
<th>required</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr><td>owner</td><td>yes</td><td>

</td></tr>
<tr><td>repo</td><td>yes</td><td>

</td></tr>
<tr><td>secret_name</td><td>yes</td><td>

</td></tr>
<tr><td>name</td><td>no</td><td>

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/actions/secrets/#delete-a-repository-secret).
8 changes: 4 additions & 4 deletions scripts/update-endpoints/generated/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -15888,7 +15888,7 @@
{
"name": "Delete a repository secret",
"scope": "actions",
"id": "createOrUpdateSecretForRepo",
"id": "deleteSecretFromRepo",
"method": "DELETE",
"url": "/repos/{owner}/{repo}/actions/secrets/{secret_name}",
"isDeprecated": false,
Expand Down Expand Up @@ -15953,10 +15953,10 @@
],
"responses": [],
"renamed": {
"before": { "scope": "actions", "id": "createOrUpdateSecretForRepo" },
"after": { "scope": "actions", "id": "createOrUpdateRepoSecret" },
"before": { "scope": "actions", "id": "deleteSecretFromRepo" },
"after": { "scope": "actions", "id": "deleteRepoSecret" },
"date": "2020-05-14",
"note": "\"actions/create-or-update-secret-for-repo\" operation ID is now \"actions/create-or-update-repo-secret\""
"note": "\"actions/delete-secret-from-repo\" operation ID is now \"actions/delete-repo-secret\""
}
},
{
Expand Down
10 changes: 9 additions & 1 deletion src/generated/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
{ renamedParameters: { name: "secret_name" } },
],
createOrUpdateSecretForRepo: [
"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}",
"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}",
{},
{
renamed: ["actions", "createOrUpdateRepoSecret"],
Expand Down Expand Up @@ -50,6 +50,14 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
{},
{ renamedParameters: { name: "secret_name" } },
],
deleteSecretFromRepo: [
"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}",
{},
{
renamed: ["actions", "deleteRepoSecret"],
renamedParameters: { name: "secret_name" },
},
],
deleteSelfHostedRunnerFromOrg: [
"DELETE /orgs/{org}/actions/runners/{runner_id}",
],
Expand Down
29 changes: 28 additions & 1 deletion src/generated/method-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,21 @@ export type RestEndpointMethods = {
endpoint: EndpointInterface<{ url: string }>;
};
/**
* Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
* Creates or updates a repository secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
*
* Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
*
*
*
* Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/stable/public/#nacl-public-sealedbox) with Python 3.
*
*
*
* Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
*
*
*
* Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
* @deprecated octokit.actions.createOrUpdateSecretForRepo() has been renamed to octokit.actions.createOrUpdateRepoSecret() (2020-05-14)
*/
createOrUpdateSecretForRepo: {
Expand Down Expand Up @@ -218,6 +232,19 @@ export type RestEndpointMethods = {
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{ url: string }>;
};
/**
* Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
* @deprecated octokit.actions.deleteSecretFromRepo() has been renamed to octokit.actions.deleteRepoSecret() (2020-05-14)
*/
deleteSecretFromRepo: {
(
params?: RestEndpointMethodTypes["actions"]["deleteSecretFromRepo"]["parameters"]
): Promise<
RestEndpointMethodTypes["actions"]["deleteSecretFromRepo"]["response"]
>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{ url: string }>;
};
/**
* **Warning:** The self-hosted runners API for organizations is currently in public beta and subject to change.
*
Expand Down
12 changes: 10 additions & 2 deletions src/generated/parameters-and-response-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export type RestEndpointMethodTypes = {
createOrUpdateSecretForRepo: {
parameters: RequestParameters &
Omit<
Endpoints["DELETE /repos/:owner/:repo/actions/secrets/:secret_name"]["parameters"],
Endpoints["PUT /repos/:owner/:repo/actions/secrets/:secret_name"]["parameters"],
"baseUrl" | "headers" | "mediaType"
>;
response: Endpoints["DELETE /repos/:owner/:repo/actions/secrets/:secret_name"]["response"];
response: Endpoints["PUT /repos/:owner/:repo/actions/secrets/:secret_name"]["response"];
};
createRegistrationToken: {
parameters: RequestParameters &
Expand Down Expand Up @@ -114,6 +114,14 @@ export type RestEndpointMethodTypes = {
>;
response: Endpoints["DELETE /repos/:owner/:repo/actions/secrets/:secret_name"]["response"];
};
deleteSecretFromRepo: {
parameters: RequestParameters &
Omit<
Endpoints["DELETE /repos/:owner/:repo/actions/secrets/:secret_name"]["parameters"],
"baseUrl" | "headers" | "mediaType"
>;
response: Endpoints["DELETE /repos/:owner/:repo/actions/secrets/:secret_name"]["response"];
};
deleteSelfHostedRunnerFromOrg: {
parameters: RequestParameters &
Omit<
Expand Down