Update OpenAPI Description (#37010)
Co-authored-by: Rachael Sewell <rachmari@github.com>
This commit is contained in:
@@ -13644,7 +13644,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -15445,7 +15445,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -15967,7 +15967,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -17941,7 +17941,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -19516,7 +19516,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -22352,7 +22352,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -23937,7 +23937,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -30485,29 +30485,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -30520,12 +30543,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -33221,29 +33254,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -33256,12 +33312,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -35872,29 +35938,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -35907,12 +35996,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -39033,29 +39132,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -39068,12 +39190,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -43925,29 +44057,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -43960,12 +44115,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -150800,29 +150965,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -150835,12 +151023,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -152547,29 +152745,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -152582,12 +152803,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -155494,29 +155725,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -155529,12 +155783,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -157294,29 +157558,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -157329,12 +157616,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -192991,7 +193288,7 @@
|
||||
"description": "<p>Validation failed, or the endpoint has been spammed.</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -200843,7 +201140,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have write access to the <code>codespaces_secrets</code>\nrepository permission to use this endpoint.</p>\n<h4 id=\"example-of-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-nodejs\">Example of encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-python\">Example of encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-c\">Example of encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-ruby\">Example of encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have write access to the <code>codespaces_secrets</code>\nrepository permission to use this endpoint.</p>\n<h4 id=\"example-of-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-nodejs\">Example of encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-python\">Example of encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-c\">Example of encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-ruby\">Example of encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -201323,7 +201620,7 @@
|
||||
"description": "<p>Validation failed, or the endpoint has been spammed.</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>.</p>\n<p>You must authenticate using an access token with the <code>codespace</code> or <code>codespace:secrets</code> scope to use this endpoint. User must also have Codespaces access to use this endpoint.</p>\n<p>GitHub Apps must have write access to the <code>codespaces_user_secrets</code> user permission and <code>codespaces_secrets</code> repository permission on all referenced repositories to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>.</p>\n<p>You must authenticate using an access token with the <code>codespace</code> or <code>codespace:secrets</code> scope to use this endpoint. User must also have Codespaces access to use this endpoint.</p>\n<p>GitHub Apps must have write access to the <code>codespaces_user_secrets</code> user permission and <code>codespaces_secrets</code> repository permission on all referenced repositories to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -230274,7 +230571,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -231920,7 +232217,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -234922,7 +235219,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "201",
|
||||
@@ -387123,8 +387420,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -387958,8 +388255,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists builts of a GitHub Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -388349,8 +388646,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about the single most recent build of a GitHub Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -388666,8 +388963,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Pages build.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -477351,7 +477648,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -492691,7 +492988,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>\n<p>This endpoint requires you to authenticate and limits you to 10 requests per minute.</p>",
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>\n<p>This endpoint requires you to authenticate and limits you to 10 requests per minute.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
|
||||
@@ -4563,7 +4563,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://HOSTNAME/api/v3",
|
||||
@@ -6364,7 +6364,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://HOSTNAME/api/v3",
|
||||
@@ -10175,7 +10175,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://HOSTNAME/api/v3",
|
||||
@@ -11665,7 +11665,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://HOSTNAME/api/v3",
|
||||
@@ -13709,7 +13709,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://HOSTNAME/api/v3",
|
||||
@@ -15199,7 +15199,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://HOSTNAME/api/v3",
|
||||
@@ -17273,7 +17273,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://HOSTNAME/api/v3",
|
||||
@@ -18773,7 +18773,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://HOSTNAME/api/v3",
|
||||
@@ -21626,29 +21626,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -21661,12 +21684,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -24277,29 +24310,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -24312,12 +24368,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -27000,29 +27066,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -27035,12 +27124,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -30351,29 +30450,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -30386,12 +30508,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -105060,29 +105192,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -105095,12 +105250,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -106807,29 +106972,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -106842,12 +107030,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -109754,29 +109952,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -109789,12 +110010,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -111554,29 +111785,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -111589,12 +111843,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -138923,7 +139187,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub AE we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/github-ae@latest/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub AE we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/github-ae@latest/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "201",
|
||||
@@ -266018,8 +266282,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub AE Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -266853,8 +267117,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists builts of a GitHub AE Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -267244,8 +267508,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about the single most recent build of a GitHub AE Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -267561,8 +267825,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub AE Pages build.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -351483,7 +351747,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/github-ae@latest/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. </li>\n<li>This API supports files up to 1 megabyte in size.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/github-ae@latest/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/github-ae@latest/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/github-ae@latest/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. </li>\n<li>This API supports files up to 1 megabyte in size.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -361104,7 +361368,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/github-ae@latest/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/github-ae@latest/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>\n<p>This endpoint requires you to authenticate and limits you to 10 requests per minute.</p>",
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/github-ae@latest/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/github-ae@latest/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>\n<p>This endpoint requires you to authenticate and limits you to 10 requests per minute.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
|
||||
@@ -14584,7 +14584,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -16385,7 +16385,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -16907,7 +16907,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -22934,7 +22934,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -24509,7 +24509,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -27319,7 +27319,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -28894,7 +28894,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -31730,7 +31730,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -33315,7 +33315,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -39863,29 +39863,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -39898,12 +39921,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -42599,29 +42632,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -42634,12 +42690,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -45250,29 +45316,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -45285,12 +45374,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -48411,29 +48510,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -48446,12 +48568,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -53303,29 +53435,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -53338,12 +53493,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -160858,29 +161023,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -160893,12 +161081,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -162605,29 +162803,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -162640,12 +162861,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -165552,29 +165783,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -165587,12 +165841,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -167352,29 +167616,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -167387,12 +167674,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -204456,7 +204753,7 @@
|
||||
"description": "<p>Validation failed, or the endpoint has been spammed.</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -212308,7 +212605,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have write access to the <code>codespaces_secrets</code>\nrepository permission to use this endpoint.</p>\n<h4 id=\"example-of-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-nodejs\">Example of encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-python\">Example of encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-c\">Example of encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-ruby\">Example of encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have write access to the <code>codespaces_secrets</code>\nrepository permission to use this endpoint.</p>\n<h4 id=\"example-of-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-nodejs\">Example of encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-python\">Example of encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-c\">Example of encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-of-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-of-encrypting-a-secret-using-ruby\">Example of encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -212788,7 +213085,7 @@
|
||||
"description": "<p>Validation failed, or the endpoint has been spammed.</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>.</p>\n<p>You must authenticate using an access token with the <code>codespace</code> or <code>codespace:secrets</code> scope to use this endpoint. User must also have Codespaces access to use this endpoint.</p>\n<p>GitHub Apps must have write access to the <code>codespaces_user_secrets</code> user permission and <code>codespaces_secrets</code> repository permission on all referenced repositories to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>.</p>\n<p>You must authenticate using an access token with the <code>codespace</code> or <code>codespace:secrets</code> scope to use this endpoint. User must also have Codespaces access to use this endpoint.</p>\n<p>GitHub Apps must have write access to the <code>codespaces_user_secrets</code> user permission and <code>codespaces_secrets</code> repository permission on all referenced repositories to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -241739,7 +242036,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -243385,7 +243682,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
@@ -246387,7 +246684,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Cloud we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Cloud we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "201",
|
||||
@@ -403867,8 +404164,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Cloud Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -404708,8 +405005,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists builts of a GitHub Enterprise Cloud Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -405099,8 +405396,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about the single most recent build of a GitHub Enterprise Cloud Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -405416,8 +405713,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Cloud Pages build.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -494102,7 +494399,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -511928,7 +512225,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>\n<p>This endpoint requires you to authenticate and limits you to 10 requests per minute.</p>",
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-cloud@latest//rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>\n<p>This endpoint requires you to authenticate and limits you to 10 requests per minute.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
|
||||
@@ -4373,7 +4373,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -6028,7 +6028,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -6550,7 +6550,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -12188,7 +12188,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -13673,7 +13673,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -16403,7 +16403,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -17888,7 +17888,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -20644,7 +20644,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -22139,7 +22139,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -24721,29 +24721,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -24756,12 +24779,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -26897,29 +26930,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -26932,12 +26988,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -31254,29 +31320,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -31289,12 +31378,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -132572,29 +132671,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -132607,12 +132729,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -134304,29 +134436,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -134339,12 +134494,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -137221,29 +137386,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -137256,12 +137444,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -139006,29 +139204,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -139041,12 +139262,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -163330,7 +163561,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -164961,7 +165192,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -167053,7 +167284,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.4/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.4/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "201",
|
||||
@@ -306037,8 +306268,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -306872,8 +307103,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists builts of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -307263,8 +307494,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about the single most recent build of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -307580,8 +307811,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages build.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -393558,7 +393789,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. </li>\n<li>This API supports files up to 1 megabyte in size.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. </li>\n<li>This API supports files up to 1 megabyte in size.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -403112,7 +403343,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.4/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.4/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.4/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
|
||||
@@ -5297,7 +5297,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -6958,7 +6958,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -7480,7 +7480,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -13400,7 +13400,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -14885,7 +14885,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -17615,7 +17615,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -19100,7 +19100,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -21856,7 +21856,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -23351,7 +23351,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -26903,29 +26903,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -26938,12 +26961,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -29478,29 +29511,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -29513,12 +29569,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -32481,29 +32547,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -32516,12 +32605,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -36974,29 +37073,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -37009,12 +37131,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -138340,29 +138472,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -138375,12 +138530,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -140078,29 +140243,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -140113,12 +140301,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -143007,29 +143205,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -143042,12 +143263,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -144798,29 +145029,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -144833,12 +145087,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -170572,7 +170836,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -172209,7 +172473,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -174301,7 +174565,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.5/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.5/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "201",
|
||||
@@ -313297,8 +313561,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -314132,8 +314396,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists builts of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -314523,8 +314787,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about the single most recent build of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -314840,8 +315104,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages build.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -400949,7 +401213,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. </li>\n<li>This API supports files up to 1 megabyte in size.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. </li>\n<li>This API supports files up to 1 megabyte in size.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -410822,7 +411086,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.5/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.5/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.5/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
|
||||
@@ -5714,7 +5714,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -7381,7 +7381,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -7903,7 +7903,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -13929,7 +13929,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -15496,7 +15496,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -18308,7 +18308,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -19875,7 +19875,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -22713,7 +22713,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -24290,7 +24290,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -27883,29 +27883,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -27918,12 +27941,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -30519,29 +30552,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -30554,12 +30610,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -33583,29 +33649,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -33618,12 +33707,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -38137,29 +38236,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -38172,12 +38294,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -140863,29 +140995,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -140898,12 +141053,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -142607,29 +142772,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -142642,12 +142830,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -145548,29 +145746,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -145583,12 +145804,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -147345,29 +147576,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -147380,12 +147634,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -173359,7 +173623,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -175002,7 +175266,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -177339,7 +177603,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.6/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.6/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "201",
|
||||
@@ -323059,8 +323323,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -323894,8 +324158,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists builts of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -324285,8 +324549,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about the single most recent build of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -324602,8 +324866,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages build.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -412190,7 +412454,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -422381,7 +422645,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
|
||||
@@ -6480,7 +6480,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -8150,7 +8150,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -8672,7 +8672,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -14709,7 +14709,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -16284,7 +16284,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -19104,7 +19104,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -20679,7 +20679,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -23525,7 +23525,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -25110,7 +25110,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -28712,29 +28712,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -28747,12 +28770,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -31354,29 +31387,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -31389,12 +31445,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -34424,29 +34490,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -34459,12 +34548,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -38993,29 +39092,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -39028,12 +39150,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -141837,29 +141969,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -141872,12 +142027,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -143584,29 +143749,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -143619,12 +143807,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -146531,29 +146729,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -146566,12 +146787,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -148331,29 +148562,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -148366,12 +148620,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -175810,7 +176074,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -177456,7 +177720,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -180150,7 +180414,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.7/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.7/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "201",
|
||||
@@ -326530,8 +326794,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -327365,8 +327629,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists builts of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -327756,8 +328020,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about the single most recent build of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -328073,8 +328337,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages build.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -415992,7 +416256,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/enterprise-server@3.7/rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/enterprise-server@3.7/rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -426231,7 +426495,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.7/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.7/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.7/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
|
||||
@@ -14671,7 +14671,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> organization permission to\nuse this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -16341,7 +16341,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -16863,7 +16863,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an environment secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>secrets</code> repository permission to use\nthis endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -22900,7 +22900,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -24475,7 +24475,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an enterprise. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>manage_runners:enterprise</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an enterprise, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -27295,7 +27295,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -28870,7 +28870,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script to remove a self-hosted runner from an organization. The token expires after one hour.</p>\n<p>You must authenticate using an access token with the <code>admin:org</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from an organization, replace <code>TOKEN</code> with the remove token provided by this\nendpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -31716,7 +31716,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to the <code>config</code> script. The token expires after one hour. You must authenticate\nusing an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-registration-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-registration-token\">Example using registration token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Configure your self-hosted runner, replacing <code>TOKEN</code> with the registration token provided by this endpoint.</p>\n<pre><code>./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -33301,7 +33301,7 @@
|
||||
"description": "<p>Created</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
"descriptionHTML": "<p>Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the <code>repo</code> scope to use this endpoint.</p>\n<h4 id=\"example-using-remove-token\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-using-remove-token\">Example using remove token<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.</p>\n<pre><code>./config.sh remove --token TOKEN\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -39674,29 +39674,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -39709,12 +39732,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -42410,29 +42443,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -42445,12 +42501,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -45061,29 +45127,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -45096,12 +45185,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -48140,29 +48239,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -48175,12 +48297,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -52716,29 +52848,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -52751,12 +52906,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -156148,29 +156313,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -156183,12 +156371,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -157895,29 +158093,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -157930,12 +158151,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -160842,29 +161073,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -160877,12 +161131,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -162642,29 +162906,52 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit",
|
||||
"examples": [
|
||||
"7638417db6d59f3c431d3e1f261cc637155684cd"
|
||||
]
|
||||
},
|
||||
"tree_id": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "SHA for the commit's tree"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"description": "Message describing the purpose of the commit",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Fix #42"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp of the commit",
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"examples": [
|
||||
"2014-08-09T08:02:04+12:00"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git author",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's author",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's author",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -162677,12 +162964,22 @@
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "Information about the Git committer",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
"description": "Name of the commit's committer",
|
||||
"type": "string",
|
||||
"examples": [
|
||||
"Monalisa Octocat"
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
"description": "Git email address of the commit's committer",
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"examples": [
|
||||
"monalisa.octocat@example.com"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -196564,7 +196861,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>admin:org</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> organization\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -198210,7 +198507,7 @@
|
||||
"description": "<p>Response when updating a secret</p>"
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
"descriptionHTML": "<p>Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n<a href=\"https://libsodium.gitbook.io/doc/bindings_for_other_languages\">LibSodium</a>. You must authenticate using an access\ntoken with the <code>repo</code> scope to use this endpoint. GitHub Apps must have the <code>dependabot_secrets</code> repository\npermission to use this endpoint.</p>\n<h4 id=\"example-encrypting-a-secret-using-nodejs\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-nodejs\">Example encrypting a secret using Node.js<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.npmjs.com/package/libsodium-wrappers\">libsodium-wrappers</a> library.</p>\n<pre><code>const sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-python\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-python\">Example encrypting a secret using Python<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using <a href=\"https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox\">pynacl</a> with Python 3.</p>\n<pre><code>from base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-c\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-c\">Example encrypting a secret using C#<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://www.nuget.org/packages/Sodium.Core/\">Sodium.Core</a> package.</p>\n<pre><code>var secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n</code></pre>\n<h4 id=\"example-encrypting-a-secret-using-ruby\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#example-encrypting-a-secret-using-ruby\">Example encrypting a secret using Ruby<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Encrypt your secret using the <a href=\"https://github.com/RubyCrypto/rbnacl\">rbnacl</a> gem.</p>\n<pre><code class=\"hljs language-ruby\"><span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"rbnacl\"</span>\n<span class=\"hljs-keyword\">require</span> <span class=\"hljs-string\">\"base64\"</span>\n\nkey = Base64.decode64(<span class=\"hljs-string\">\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"</span>)\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(<span class=\"hljs-string\">\"my_secret\"</span>)\n\n<span class=\"hljs-comment\"># Print the base64 encoded secret</span>\nputs Base64.strict_encode64(encrypted_secret)\n</code></pre>"
|
||||
},
|
||||
{
|
||||
"serverUrl": "http(s)://HOSTNAME/api/v3",
|
||||
@@ -200914,7 +201211,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.8/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"descriptionHTML": "<p>Deployments offer a few configurable parameters with certain defaults.</p>\n<p>The <code>ref</code> parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.</p>\n<p>The <code>environment</code> parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as <code>production</code>, <code>staging</code>, and <code>qa</code>. This parameter\nmakes it easier to track which environments have requested deployments. The default environment is <code>production</code>.</p>\n<p>The <code>auto_merge</code> parameter is used to ensure that the requested ref is not behind the repository's default branch. If\nthe ref <em>is</em> behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.</p>\n<p>By default, <a href=\"https://docs.github.com/enterprise-server@3.8/rest/commits/statuses\">commit statuses</a> for every submitted context must be in a <code>success</code>\nstate. The <code>required_contexts</code> parameter allows you to specify a subset of contexts that must be <code>success</code>, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot require any contexts or create any commit statuses, the deployment will always succeed.</p>\n<p>The <code>payload</code> parameter is available for any extra information that a deployment system might need. It is a JSON text\nfield that will be passed on when a deployment event is dispatched.</p>\n<p>The <code>task</code> parameter is used by the deployment system to allow different execution paths. In the web world this might\nbe <code>deploy:migrations</code> to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.</p>\n<p>Users with <code>repo</code> or <code>repo_deployment</code> scopes can create a deployment for a given ref.</p>\n<h4 id=\"merged-branch-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merged-branch-response\">Merged branch response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:</p>\n<ul>\n<li>Auto-merge option is enabled in the repository</li>\n<li>Topic branch does not include the latest changes on the base branch, which is <code>master</code> in the response example</li>\n<li>There are no merge conflicts</li>\n</ul>\n<p>If there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.</p>\n<h4 id=\"merge-conflict-response\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#merge-conflict-response\">Merge conflict response<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>auto_merge</code> option is enabled and when the default branch (in this case <code>master</code>), can't\nbe merged into the branch that's being deployed (in this case <code>topic-branch</code>), due to merge conflicts.</p>\n<h4 id=\"failed-commit-status-checks\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#failed-commit-status-checks\">Failed commit status checks<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>This error happens when the <code>required_contexts</code> parameter indicates that one or more contexts need to have a <code>success</code>\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of <code>success</code>.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "201",
|
||||
@@ -347689,8 +347986,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -348524,8 +348821,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists builts of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -348915,8 +349212,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about the single most recent build of a GitHub Enterprise Server Pages site.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -349232,8 +349529,8 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"descriptionHTML": "",
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about a GitHub Enterprise Server Pages build.</p>\n<p>A token with the <code>repo</code> scope is required. GitHub Apps must have the <code>pages:read</code> permission.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -437203,7 +437500,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/enterprise-server@3.8/rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"descriptionHTML": "<p>Gets the contents of a file or directory in a repository. Specify the file path or directory in <code>:path</code>. If you omit\n<code>:path</code>, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. </p>\n<p>Files and symlinks support <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/repos#custom-media-types\">a custom media type</a> for\nretrieving the raw content or rendered HTML (when supported). All content types support <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/repos#custom-media-types\">a custom media\ntype</a> to ensure the content is returned in a consistent\nobject format.</p>\n<p><strong>Notes</strong>:</p>\n<ul>\n<li>To get a repository's contents recursively, you can <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/git#trees\">recursively get the tree</a>.</li>\n<li>This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/git#get-a-tree\">Git Trees\nAPI</a>.</li>\n<li>Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.</li>\n</ul>\n<h4 id=\"size-limits\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#size-limits\">Size limits<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested file's size is:</p>\n<ul>\n<li>1 MB or smaller: All features of this endpoint are supported.</li>\n<li>Between 1-100 MB: Only the <code>raw</code> or <code>object</code> <a href=\"https://docs.github.com/enterprise-server@3.8/rest/repos/contents#custom-media-types-for-repository-contents\">custom media types</a> are supported. Both will work as normal, except that when using the <code>object</code> media type, the <code>content</code> field will be an empty string and the <code>encoding</code> field will be <code>\"none\"</code>. To get the contents of these larger files, use the <code>raw</code> media type.</li>\n<li>Greater than 100 MB: This endpoint is not supported.</li>\n</ul>\n<h4 id=\"if-the-content-is-a-directory\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-directory\">If the content is a directory<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\n<em>should</em> be \"submodule\". This behavior exists in API v3 <a href=\"https://git.io/v1YCW\">for backwards compatibility purposes</a>.\nIn the next major version of the API, the type will be returned as \"submodule\".</p>\n<h4 id=\"if-the-content-is-a-symlink\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-symlink\">If the content is a symlink<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>If the requested <code>:path</code> points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.</p>\n<h4 id=\"if-the-content-is-a-submodule\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#if-the-content-is-a-submodule\">If the content is a submodule<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>The <code>submodule_git_url</code> identifies the location of the submodule repository, and the <code>sha</code> identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe submodule at that specific commit.</p>\n<p>If the submodule repository is not hosted on github.com, the Git URLs (<code>git_url</code> and <code>_links[\"git\"]</code>) and the\ngithub.com URLs (<code>html_url</code> and <code>_links[\"html\"]</code>) will have null values.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
@@ -447442,7 +447739,7 @@
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.8/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"> #</span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"descriptionHTML": "<p>Searches for query terms inside of a file. This method returns up to 100 results <a href=\"https://docs.github.com/enterprise-server@3.8/rest/overview/resources-in-the-rest-api#pagination\">per page</a>.</p>\n<p>When searching for code, you can get text match metadata for the file <strong>content</strong> and file <strong>path</strong> fields when you pass the <code>text-match</code> media type. For more details about how to receive highlighted search results, see <a href=\"https://docs.github.com/enterprise-server@3.8/rest/reference/search#text-match-metadata\">Text match metadata</a>.</p>\n<p>For example, if you want to find the definition of the <code>addClass</code> function inside <a href=\"https://github.com/jquery/jquery\">jQuery</a> repository, your query would look something like this:</p>\n<p><code>q=addClass+in:file+language:js+repo:jquery/jquery</code></p>\n<p>This query searches for the keyword <code>addClass</code> within a file's contents. The query limits the search to files where the language is JavaScript in the <code>jquery/jquery</code> repository.</p>\n<h4 id=\"considerations-for-code-search\" tabindex=\"-1\"><a class=\"heading-link\" href=\"#considerations-for-code-search\">Considerations for code search<span class=\"heading-link-symbol\" aria-hidden=\"true\"></span></a></h4>\n<p>Due to the complexity of searching code, there are a few restrictions on how searches are performed:</p>\n<ul>\n<li>Only the <em>default branch</em> is considered. In most cases, this will be the <code>master</code> branch.</li>\n<li>Only files smaller than 384 KB are searchable.</li>\n<li>You must always include at least one search term when searching source code. For example, searching for <a href=\"https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code\"><code>language:go</code></a> is not valid, while <a href=\"https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code\"><code>amazing language:go</code></a> is.</li>\n</ul>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
|
||||
@@ -30,5 +30,5 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"sha": "9ebe01d1bd3b3b323f2fbbf18f77b0c49f94c442"
|
||||
"sha": "32e8e407fdb3957859a03ae38a6c0bd6513f3c7e"
|
||||
}
|
||||
Reference in New Issue
Block a user