Skip to content

Commit

Permalink
fix: revert "feat: many unreleased updates to endpoint methods (#607)" (
Browse files Browse the repository at this point in the history
#610)

This reverts commit 1e9bf68.
  • Loading branch information
wolfy1339 committed Jan 21, 2023
1 parent 1e9bf68 commit 691b726
Show file tree
Hide file tree
Showing 261 changed files with 5,945 additions and 10,200 deletions.
48 changes: 0 additions & 48 deletions docs/actions/addSelectedRepoToOrgVariable.md

This file was deleted.

54 changes: 0 additions & 54 deletions docs/actions/addSelectedRepoToRequiredWorkflow.md

This file was deleted.

58 changes: 0 additions & 58 deletions docs/actions/createEnvironmentVariable.md

This file was deleted.

28 changes: 13 additions & 15 deletions docs/actions/createOrUpdateEnvironmentSecret.md
Expand Up @@ -15,27 +15,25 @@ this endpoint.

#### Example encrypting a secret using Node.js

Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library.
Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.

```
const sodium = require('libsodium-wrappers')
const secret = 'plain-text-secret' // replace with the secret you want to encrypt
const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key
const sodium = require('tweetsodium');
//Check if libsodium is ready and then proceed.
sodium.ready.then(() => {
// Convert Secret & Base64 key to Uint8Array.
let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)
let binsec = sodium.from_string(secret)
const key = "base64-encoded-public-key";
const value = "plain-text-secret";
//Encrypt the secret using LibSodium
let encBytes = sodium.crypto_box_seal(binsec, binkey)
// Convert the message and key to Uint8Array's (Buffer implements that interface)
const messageBytes = Buffer.from(value);
const keyBytes = Buffer.from(key, 'base64');
// Convert encrypted Uint8Array to Base64
let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)
// Encrypt using LibSodium.
const encryptedBytes = sodium.seal(messageBytes, keyBytes);
console.log(output)
});
// Base64 the encrypted secret
const encrypted = Buffer.from(encryptedBytes).toString('base64');
console.log(encrypted);
```

#### Example encrypting a secret using Python
Expand Down
28 changes: 13 additions & 15 deletions docs/actions/createOrUpdateRepoSecret.md
Expand Up @@ -15,27 +15,25 @@ this endpoint.

#### Example encrypting a secret using Node.js

Encrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library.
Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.

```
const sodium = require('libsodium-wrappers')
const secret = 'plain-text-secret' // replace with the secret you want to encrypt
const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key
const sodium = require('tweetsodium');
//Check if libsodium is ready and then proceed.
sodium.ready.then(() => {
// Convert Secret & Base64 key to Uint8Array.
let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)
let binsec = sodium.from_string(secret)
const key = "base64-encoded-public-key";
const value = "plain-text-secret";
//Encrypt the secret using LibSodium
let encBytes = sodium.crypto_box_seal(binsec, binkey)
// Convert the message and key to Uint8Array's (Buffer implements that interface)
const messageBytes = Buffer.from(value);
const keyBytes = Buffer.from(key, 'base64');
// Convert encrypted Uint8Array to Base64
let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)
// Encrypt using LibSodium.
const encryptedBytes = sodium.seal(messageBytes, keyBytes);
console.log(output)
});
// Base64 the encrypted secret
const encrypted = Buffer.from(encryptedBytes).toString('base64');
console.log(encrypted);
```

#### Example encrypting a secret using Python
Expand Down
63 changes: 0 additions & 63 deletions docs/actions/createOrgVariable.md

This file was deleted.

58 changes: 0 additions & 58 deletions docs/actions/createRepoVariable.md

This file was deleted.

0 comments on commit 691b726

Please sign in to comment.