Skip to content

Commit 691b726

Browse files
authored
fix: revert "feat: many unreleased updates to endpoint methods (#607)" (#610)
This reverts commit 1e9bf68.
1 parent 1e9bf68 commit 691b726

File tree

261 files changed

+5945
-10200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

261 files changed

+5945
-10200
lines changed

docs/actions/addSelectedRepoToOrgVariable.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/actions/addSelectedRepoToRequiredWorkflow.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

docs/actions/createEnvironmentVariable.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

docs/actions/createOrUpdateEnvironmentSecret.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,25 @@ this endpoint.
1515

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

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

2020
```
21-
const sodium = require('libsodium-wrappers')
22-
const secret = 'plain-text-secret' // replace with the secret you want to encrypt
23-
const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key
21+
const sodium = require('tweetsodium');
2422
25-
//Check if libsodium is ready and then proceed.
26-
sodium.ready.then(() => {
27-
// Convert Secret & Base64 key to Uint8Array.
28-
let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)
29-
let binsec = sodium.from_string(secret)
23+
const key = "base64-encoded-public-key";
24+
const value = "plain-text-secret";
3025
31-
//Encrypt the secret using LibSodium
32-
let encBytes = sodium.crypto_box_seal(binsec, binkey)
26+
// Convert the message and key to Uint8Array's (Buffer implements that interface)
27+
const messageBytes = Buffer.from(value);
28+
const keyBytes = Buffer.from(key, 'base64');
3329
34-
// Convert encrypted Uint8Array to Base64
35-
let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)
30+
// Encrypt using LibSodium.
31+
const encryptedBytes = sodium.seal(messageBytes, keyBytes);
3632
37-
console.log(output)
38-
});
33+
// Base64 the encrypted secret
34+
const encrypted = Buffer.from(encryptedBytes).toString('base64');
35+
36+
console.log(encrypted);
3937
```
4038

4139
#### Example encrypting a secret using Python

docs/actions/createOrUpdateRepoSecret.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,25 @@ this endpoint.
1515

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

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

2020
```
21-
const sodium = require('libsodium-wrappers')
22-
const secret = 'plain-text-secret' // replace with the secret you want to encrypt
23-
const key = 'base64-encoded-public-key' // replace with the Base64 encoded public key
21+
const sodium = require('tweetsodium');
2422
25-
//Check if libsodium is ready and then proceed.
26-
sodium.ready.then(() => {
27-
// Convert Secret & Base64 key to Uint8Array.
28-
let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)
29-
let binsec = sodium.from_string(secret)
23+
const key = "base64-encoded-public-key";
24+
const value = "plain-text-secret";
3025
31-
//Encrypt the secret using LibSodium
32-
let encBytes = sodium.crypto_box_seal(binsec, binkey)
26+
// Convert the message and key to Uint8Array's (Buffer implements that interface)
27+
const messageBytes = Buffer.from(value);
28+
const keyBytes = Buffer.from(key, 'base64');
3329
34-
// Convert encrypted Uint8Array to Base64
35-
let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)
30+
// Encrypt using LibSodium.
31+
const encryptedBytes = sodium.seal(messageBytes, keyBytes);
3632
37-
console.log(output)
38-
});
33+
// Base64 the encrypted secret
34+
const encrypted = Buffer.from(encryptedBytes).toString('base64');
35+
36+
console.log(encrypted);
3937
```
4038

4139
#### Example encrypting a secret using Python

docs/actions/createOrgVariable.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

docs/actions/createRepoVariable.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)