diff --git a/lib/octokit/client/actions_secrets.rb b/lib/octokit/client/actions_secrets.rb index d6cd611b7..1abf2a7f4 100644 --- a/lib/octokit/client/actions_secrets.rb +++ b/lib/octokit/client/actions_secrets.rb @@ -15,6 +15,15 @@ def get_actions_public_key(repo) get "#{Repository.path repo}/actions/secrets/public-key" end + # Get public key for secrets encryption + # + # @param org [String] A GitHub organization + # @return [Hash] key_id and key + # @see https://developer.github.com/v3/actions/secrets/#get-your-public-key + def get_org_actions_public_key(org) + get "#{Organization.path org}/actions/secrets/public-key" + end + # List secrets # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -26,6 +35,17 @@ def list_actions_secrets(repo) end end + # List org secrets + # + # @param org [String] A GitHub organization + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://developer.github.com/v3/actions/secrets/#list-organization-secrets + def list_org_actions_secrets(org) + paginate "#{Organization.path org}/actions/secrets" do |data, last_response| + data.secrets.concat last_response.data.secrets + end + end + # Get a secret # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -36,6 +56,16 @@ def get_actions_secret(repo, name) get "#{Repository.path repo}/actions/secrets/#{name}" end + # Get an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @return [Hash] name, created_at and updated_at + # @see https://developer.github.com/v3/actions/secrets/#get-a-secret + def get_org_actions_secret(org, name) + get "#{Organization.path org}/actions/secrets/#{name}" + end + # Create or update secrets # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -46,6 +76,16 @@ def create_or_update_actions_secret(repo, name, options) put "#{Repository.path repo}/actions/secrets/#{name}", options end + # Create or update org secrets + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret + def create_or_update_org_actions_secret(org, name, options) + put "#{Organization.path org}/actions/secrets/#{name}", options + end + # Delete a secret # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -55,6 +95,15 @@ def delete_actions_secret(repo, name) boolean_from_response :delete, "#{Repository.path repo}/actions/secrets/#{name}" end + # Delete an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @see https://developer.github.com/v3/actions/secrets/#delete-a-secret + def delete_org_actions_secret(org, name) + boolean_from_response :delete, "#{Organization.path org}/actions/secrets/#{name}" + end + # Get environment public key for secrets encryption # # @param repo [Integer, String, Hash, Repository] A GitHub repository diff --git a/lib/octokit/client/codespaces_secrets.rb b/lib/octokit/client/codespaces_secrets.rb index 7923685f2..08fa2f5b4 100644 --- a/lib/octokit/client/codespaces_secrets.rb +++ b/lib/octokit/client/codespaces_secrets.rb @@ -15,6 +15,15 @@ def get_codespaces_public_key(repo) get "#{Repository.path repo}/codespaces/secrets/public-key" end + # Get public key for secrets encryption + # + # @param org [String] A GitHub organization + # @return [Hash] key_id and key + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#get-an-organization-public-key + def get_org_codespaces_public_key(org) + get "#{Organization.path org}/codespaces/secrets/public-key" + end + # List secrets # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -26,6 +35,17 @@ def list_codespaces_secrets(repo) end end + # List org secrets + # + # @param org [String] A GitHub organization + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#list-organization-secrets + def list_org_codespaces_secrets(org) + paginate "#{Organization.path org}/codespaces/secrets" do |data, last_response| + data.secrets.concat last_response.data.secrets + end + end + # Get a secret # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -36,6 +56,16 @@ def get_codespaces_secret(repo, name) get "#{Repository.path repo}/codespaces/secrets/#{name}" end + # Get an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @return [Hash] name, created_at, updated_at, and visibility + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#get-an-organization-secret + def get_org_codespaces_secret(org, name) + get "#{Organization.path org}/codespaces/secrets/#{name}" + end + # Create or update secrets # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -46,6 +76,16 @@ def create_or_update_codespaces_secret(repo, name, options) put "#{Repository.path repo}/codespaces/secrets/#{name}", options end + # Create or update org secrets + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret + def create_or_update_org_codespaces_secret(org, name, options) + put "#{Organization.path org}/codespaces/secrets/#{name}", options + end + # Delete a secret # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -54,6 +94,15 @@ def create_or_update_codespaces_secret(repo, name, options) def delete_codespaces_secret(repo, name) boolean_from_response :delete, "#{Repository.path repo}/codespaces/secrets/#{name}" end + + # Delete an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @see https://docs.github.com/en/rest/codespaces/organization-secrets?apiVersion=2022-11-28#delete-an-organization-secret + def delete_org_codespaces_secret(org, name) + boolean_from_response :delete, "#{Organization.path org}/codespaces/secrets/#{name}" + end end end end diff --git a/lib/octokit/client/dependabot_secrets.rb b/lib/octokit/client/dependabot_secrets.rb index 687c1b479..5ac765a5a 100644 --- a/lib/octokit/client/dependabot_secrets.rb +++ b/lib/octokit/client/dependabot_secrets.rb @@ -15,6 +15,15 @@ def get_dependabot_public_key(repo) get "#{Repository.path repo}/dependabot/secrets/public-key" end + # Get public key for secrets encryption + # + # @param org [String] A GitHub organization + # @return [Hash] key_id and key + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#get-an-organization-public-key + def get_org_dependabot_public_key(org) + get "#{Organization.path org}/dependabot/secrets/public-key" + end + # List secrets # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -26,6 +35,17 @@ def list_dependabot_secrets(repo) end end + # List org secrets + # + # @param org [String] A GitHub organization + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#list-organization-secrets + def list_org_dependabot_secrets(org) + paginate "#{Organization.path org}/dependabot/secrets" do |data, last_response| + data.secrets.concat last_response.data.secrets + end + end + # Get a secret # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -36,6 +56,16 @@ def get_dependabot_secret(repo, name) get "#{Repository.path repo}/dependabot/secrets/#{name}" end + # Get an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @return [Hash] name, created_at, updated_at, and visibility + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#get-an-organization-secret + def get_org_dependabot_secret(org, name) + get "#{Organization.path org}/dependabot/secrets/#{name}" + end + # Create or update secrets # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -46,6 +76,16 @@ def create_or_update_dependabot_secret(repo, name, options) put "#{Repository.path repo}/dependabot/secrets/#{name}", options end + # Create or update org secrets + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret + def create_or_update_org_dependabot_secret(org, name, options) + put "#{Organization.path org}/dependabot/secrets/#{name}", options + end + # Delete a secret # # @param repo [Integer, String, Hash, Repository] A GitHub repository @@ -54,6 +94,15 @@ def create_or_update_dependabot_secret(repo, name, options) def delete_dependabot_secret(repo, name) boolean_from_response :delete, "#{Repository.path repo}/dependabot/secrets/#{name}" end + + # Delete an org secret + # + # @param org [String] A GitHub organization + # @param name [String] Name of secret + # @see https://docs.github.com/en/rest/dependabot/organization-secrets?apiVersion=2022-11-28#delete-an-organization-secret + def delete_org_dependabot_secret(org, name) + boolean_from_response :delete, "#{Organization.path org}/dependabot/secrets/#{name}" + end end end end diff --git a/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org/_get_org_actions_public_key/get_org_public_key_for_secrets_encryption.json b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org/_get_org_actions_public_key/get_org_public_key_for_secrets_encryption.json new file mode 100644 index 000000000..626ef47d6 --- /dev/null +++ b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org/_get_org_actions_public_key/get_org_public_key_for_secrets_encryption.json @@ -0,0 +1,124 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 21:53:47 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"aa41a98fa5415fc5a3e22c00ea9be5c5d60b20bac3cf4fcecbf1b751180b3347\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4989" + ], + "X-Ratelimit-Reset": [ + "1702418555" + ], + "X-Ratelimit-Used": [ + "11" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C796:323D:92063D:970C7C:6578D66B" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJrZXkiOiJPSkU3Q1dq\nOEFPZVY1cUVaeUVnck1oZ1RGTjlaK3FPNzlmUUN4cmJiUkZFPSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 21:53:47 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_create_or_update_org_actions_secret/updating_existing_secret_returns_204.json b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_create_or_update_org_actions_secret/updating_existing_secret_returns_204.json new file mode 100644 index 000000000..22374ecbd --- /dev/null +++ b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_create_or_update_org_actions_secret/updating_existing_secret_returns_204.json @@ -0,0 +1,561 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:57:46 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"aa41a98fa5415fc5a3e22c00ea9be5c5d60b20bac3cf4fcecbf1b751180b3347\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4936" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "64" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C9D2:2411:CFBE:D8D0:6578E56A" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJrZXkiOiJPSkU3Q1dq\nOEFPZVY1cUVaeUVnck1oZ1RGTjlaK3FPNzlmUUN4cmJiUkZFPSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:57:46 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJVSC9WOXRhZ3N2VUkwb2xQLzVwMmVQSUEzQVV6bFdiMThDb24rcGwy\ncGtvbmIyalB1V0lLeFV5cENVWjk1VmFYenExbksrVHBtaHJjZFhUcCIsInZp\nc2liaWxpdHkiOiJwcml2YXRlIn0=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:57:46 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4935" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "65" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C9D3:323D:A393D3:A93D5D:6578E56A" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:57:46 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiI3aXdybzQ5Uno5OXlIaFVyQVdWSy8zWDNLWC9LaGFGOHo4TUY3OCtO\nK0NoV3VZdjluelV0MWlGV2p1SGwyMndudDcxdlNOTkhiTUc1c1BRT1pBPT0i\nLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:57:47 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4934" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "66" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C9D4:2512:B4518D:B9FC39:6578E56A" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:57:47 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:57:47 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"aa41a98fa5415fc5a3e22c00ea9be5c5d60b20bac3cf4fcecbf1b751180b3347\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4933" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "67" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C9D5:0333:B0DCDA:B690CF:6578E56B" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJrZXkiOiJPSkU3Q1dq\nOEFPZVY1cUVaeUVnck1oZ1RGTjlaK3FPNzlmUUN4cmJiUkZFPSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:57:47 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiIyem51c0hPNlVKRHlCdUdHOE5kRjgvQWJvUXFjMGVBQlpWVlNjSWxi\nV0Z2NzRtMVY5YnRtNUdWYTR6KzhJUnNrVHIyTE1tRmxWUWcxIiwidmlzaWJp\nbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:57:47 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4932" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "68" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C9D6:9D10:B91BA4:BEC5F9:6578E56B" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:57:47 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_delete_org_actions_secret/delete_existing_secret.json b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_delete_org_actions_secret/delete_existing_secret.json new file mode 100644 index 000000000..7b62544f4 --- /dev/null +++ b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_delete_org_actions_secret/delete_existing_secret.json @@ -0,0 +1,442 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:38:10 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"aa41a98fa5415fc5a3e22c00ea9be5c5d60b20bac3cf4fcecbf1b751180b3347\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4967" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "33" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8D6:19CB:A18FC9:A7085B:6578E0D2" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJrZXkiOiJPSkU3Q1dq\nOEFPZVY1cUVaeUVnck1oZ1RGTjlaK3FPNzlmUUN4cmJiUkZFPSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:38:10 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJKK3ZZcmx5R1c3UkdibE1aRXE5QzMzcWI1NWUrYnRlSWFxNHJzc0xC\nQlErZWQ5RFF1UEp0RHJSUEEwWmE2MFcvZnErRERZK1NrZ2hRM1BvciIsInZp\nc2liaWxpdHkiOiJwcml2YXRlIn0=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:38:10 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4966" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "34" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C8D7:9D10:B32EEE:B8A739:6578E0D2" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:38:10 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJSblJkRU1yWDhIUUpIS2tiZlZYN0o2cnlmZ0crUHpTMG9Yd3piblFX\naGlkMFFXeFU5UW5rNnVNbVZoTlBuQ3RWMnJ3dWtNTCtsOFpoNXFhRGVnPT0i\nLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:38:11 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4965" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "35" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C8D8:0C75:A4B46F:AA3539:6578E0D2" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:38:11 GMT" + }, + { + "request": { + "method": "delete", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:38:11 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4964" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "36" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C8D9:3671:B6E6F9:BC5F64:6578E0D3" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:38:11 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_get_org_actions_secret/return_timestamps_related_to_one_secret.json b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_get_org_actions_secret/return_timestamps_related_to_one_secret.json new file mode 100644 index 000000000..c076d46ad --- /dev/null +++ b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_get_org_actions_secret/return_timestamps_related_to_one_secret.json @@ -0,0 +1,455 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:41:34 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"aa41a98fa5415fc5a3e22c00ea9be5c5d60b20bac3cf4fcecbf1b751180b3347\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4955" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "45" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8F1:323D:9F420E:A4C248:6578E19E" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJrZXkiOiJPSkU3Q1dq\nOEFPZVY1cUVaeUVnck1oZ1RGTjlaK3FPNzlmUUN4cmJiUkZFPSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:41:34 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJSSjBPNWwxNi9FU1ZEeWlrb0o1elVFaTM3dzhwZzdOL01MakJJYldH\nSDFKOHhsbndDMTROaHYwc2JaTVZYRmRXbnlKZHhxSkwxM1lpZEpqQSIsInZp\nc2liaWxpdHkiOiJwcml2YXRlIn0=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:41:34 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4954" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "46" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C8F2:0333:AC476E:B1D1CF:6578E19E" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:41:34 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiI1WXI4b2w5Y21nK2JsSnRRTVJTaVgrR2lTRUZvUlpVNy80TU9hVmFW\nMVhVdTA4WmpzTFljTGdPUUlnc0dUc2g3KytZRlE5aHVJYVFDbmwvVnBnPT0i\nLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:41:34 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4953" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "47" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C8F3:2512:AF734D:B4F491:6578E19E" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:41:34 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:41:35 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"a4c5f6627b15ebb517d3b25c92544eea00df6b97a37a20f2ae77021947281aae\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4952" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "48" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8F4:84D0:B5BC52:BB5EF7:6578E19F" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJuYW1lIjoiU0VDUkVUX05BTUUiLCJjcmVhdGVkX2F0IjoiMjAyMy0xMi0x\nMlQyMjozOTowMloiLCJ1cGRhdGVkX2F0IjoiMjAyMy0xMi0xMlQyMjo0MToz\nNVoiLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:41:35 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_list_org_actions_secrets/auto-paginates_the_results.json b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_list_org_actions_secrets/auto-paginates_the_results.json new file mode 100644 index 000000000..eea8fff2e --- /dev/null +++ b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_list_org_actions_secrets/auto-paginates_the_results.json @@ -0,0 +1,606 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:34:14 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"aa41a98fa5415fc5a3e22c00ea9be5c5d60b20bac3cf4fcecbf1b751180b3347\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4986" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "14" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8B0:372E:B7871F:BD06C4:6578DFE6" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJrZXkiOiJPSkU3Q1dq\nOEFPZVY1cUVaeUVnck1oZ1RGTjlaK3FPNzlmUUN4cmJiUkZFPSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:34:14 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJuVFZwdmYwRm5sdWkrdmFhS0NoblN2UzRGb09mcEwxeURsSDc1K25h\ndm5odDRCM2hHdnowZms2TkwrRnYxNXJxOVNQYnNHYU45K0g1aW1OWiIsInZp\nc2liaWxpdHkiOiJwcml2YXRlIn0=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 201, + "message": "Created" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:34:14 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "\"d5f61838397b8a0e30906d08a5e681f131eabf9bd1f7c651aca95cefa97824f8\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4985" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "15" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8B1:2512:AD1CE9:B28B86:6578DFE6" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:34:14 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiIxOHJ0R0JEbzIzTml6MkVNdytsYVRjOHpUZm9NNTRxMGhrVzVWMTZq\na0NPN2pXaE1KRitYM1VOMnpHbUFUZTh3Z1RTR3Y1ZVVEWElTTkdiKzlRPT0i\nLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 201, + "message": "Created" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:34:15 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "\"d5f61838397b8a0e30906d08a5e681f131eabf9bd1f7c651aca95cefa97824f8\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4984" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "16" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8B2:9D10:B20FB1:B77E0A:6578DFE6" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:34:15 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets?per_page=1", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:34:15 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"5a154d06691665d38b147306901033daef2851b6f31e0296408e064656575b01\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "Link": [ + "; rel=\"next\", ; rel=\"last\"" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4983" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "17" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8B3:0333:AA0619:AF7DC6:6578DFE7" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FIiwiY3JlYXRlZF9hdCI6IjIwMjMtMTItMTJUMjI6MzQ6MTVaIiwidXBk\nYXRlZF9hdCI6IjIwMjMtMTItMTJUMjI6MzQ6MTVaIiwidmlzaWJpbGl0eSI6\nInByaXZhdGUifV19\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:34:15 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/organizations/64329988/actions/secrets?page=2&per_page=1", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:34:15 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"8442058bb414fa3d5483cd3b8a3df2e903626d1e07b0f162e9f1dca9c631a945\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "Link": [ + "; rel=\"prev\", ; rel=\"first\"" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4982" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "18" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8B4:0C75:A39E4D:A914FC:6578DFE7" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FMiIsImNyZWF0ZWRfYXQiOiIyMDIzLTEyLTEyVDIyOjM0OjE1WiIsInVw\nZGF0ZWRfYXQiOiIyMDIzLTEyLTEyVDIyOjM0OjE1WiIsInZpc2liaWxpdHki\nOiJwcml2YXRlIn1dfQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:34:15 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_list_org_actions_secrets/paginates_the_results.json b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_list_org_actions_secrets/paginates_the_results.json new file mode 100644 index 000000000..3e5e5fb52 --- /dev/null +++ b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_list_org_actions_secrets/paginates_the_results.json @@ -0,0 +1,458 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:35:57 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"aa41a98fa5415fc5a3e22c00ea9be5c5d60b20bac3cf4fcecbf1b751180b3347\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4981" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "19" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8BF:323D:9DD152:A3433C:6578E04D" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJrZXkiOiJPSkU3Q1dq\nOEFPZVY1cUVaeUVnck1oZ1RGTjlaK3FPNzlmUUN4cmJiUkZFPSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:35:57 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJDemNDTzhZek1nWHFzRTRMdmY3emlvVU1OV1VRQWlhMUtQV2krZU51\nSTJibXlyNWFmYi9Ja3Q2TSs1aktIcG56UVBpRGVLbG02WmgycFpCSSIsInZp\nc2liaWxpdHkiOiJwcml2YXRlIn0=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:35:57 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4980" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "20" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C8C0:40AD:A89493:AE07A9:6578E04D" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:35:57 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJRVmV2RGQ3cU9BOXgwZnIwR1Q2Y2lFdk5zZXFhcmxSSlNVOGRzNURa\ncVNWMVhyWjQ4Qnp2WUJVeGtwdVNBQ3VtUEtEWUM1b0VBeHk4U3hwV3VRPT0i\nLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:35:58 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4979" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "21" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C8C1:4A8C:A426F9:A9AAEA:6578E04D" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:35:58 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets?per_page=1", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:35:58 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"6b0af939cb57483b11ed4a29cb5f7265468b65c6903a7f00eedfc3c42c654d99\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "Link": [ + "; rel=\"next\", ; rel=\"last\"" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4978" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "22" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8C2:8D09:918ACD:9696DB:6578E04E" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FIiwiY3JlYXRlZF9hdCI6IjIwMjMtMTItMTJUMjI6MzQ6MTVaIiwidXBk\nYXRlZF9hdCI6IjIwMjMtMTItMTJUMjI6MzU6NThaIiwidmlzaWJpbGl0eSI6\nInByaXZhdGUifV19\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:35:58 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_list_org_actions_secrets/returns_list_of_two_secrets.json b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_list_org_actions_secrets/returns_list_of_two_secrets.json new file mode 100644 index 000000000..695708361 --- /dev/null +++ b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_with_a_secret/_list_org_actions_secrets/returns_list_of_two_secrets.json @@ -0,0 +1,455 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:35:58 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"aa41a98fa5415fc5a3e22c00ea9be5c5d60b20bac3cf4fcecbf1b751180b3347\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4977" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "23" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8C3:3D46:CC0DD6:D1920E:6578E04E" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJrZXkiOiJPSkU3Q1dq\nOEFPZVY1cUVaeUVnck1oZ1RGTjlaK3FPNzlmUUN4cmJiUkZFPSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:35:58 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJFUXBrY2xXOSt4WGo2a0M5TDNMZis2cVpLZWFvYXFkcGxPUDdwMnR4\ndFg1Z3RGNk1yWENOMis5THk2NU5QZXk0Unk4UU5ydHZwWWhpK2NzNCIsInZp\nc2liaWxpdHkiOiJwcml2YXRlIn0=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:35:58 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4976" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "24" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C8C4:323D:9DD2B6:A344BD:6578E04E" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:35:58 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJrT1ArZHlVcGhkeWZpMkNJS0c5Y1Y3NDJwZkpCcXdFK052M1lYVHRJ\nTTFxVnZGL3ViQXRjNkcwamh3L09SL29KWmFHQ2tkdVJaWmNmdWl1TlhBPT0i\nLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:35:59 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4975" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "25" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "C8C5:3D46:CC0E6A:D192A1:6578E04E" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:35:59 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:35:59 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"a1883ba2159cb5edd69eb7479b2d0ea94349e1f6eefddc508149275e1fa17804\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4974" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "26" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C8C6:372E:B810E3:BD9500:6578E04F" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FIiwiY3JlYXRlZF9hdCI6IjIwMjMtMTItMTJUMjI6MzQ6MTVaIiwidXBk\nYXRlZF9hdCI6IjIwMjMtMTItMTJUMjI6MzU6NTlaIiwidmlzaWJpbGl0eSI6\nInByaXZhdGUifSx7Im5hbWUiOiJTRUNSRVRfTkFNRTIiLCJjcmVhdGVkX2F0\nIjoiMjAyMy0xMi0xMlQyMjozNDoxNVoiLCJ1cGRhdGVkX2F0IjoiMjAyMy0x\nMi0xMlQyMjozNTo1OVoiLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9XX0=\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:35:59 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_without_secrets/_create_or_update_org_actions_secret/creating_secret_returns_201.json b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_without_secrets/_create_or_update_org_actions_secret/creating_secret_returns_201.json new file mode 100644 index 000000000..588f3bbd1 --- /dev/null +++ b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_without_secrets/_create_or_update_org_actions_secret/creating_secret_returns_201.json @@ -0,0 +1,243 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:58:54 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"aa41a98fa5415fc5a3e22c00ea9be5c5d60b20bac3cf4fcecbf1b751180b3347\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4931" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "69" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C9DE:372E:BFBDE1:C57D28:6578E5AE" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJrZXkiOiJPSkU3Q1dq\nOEFPZVY1cUVaeUVnck1oZ1RGTjlaK3FPNzlmUUN4cmJiUkZFPSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:58:54 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//actions/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiI1NjgyNTAxNjcyNDI1NDk3NDMiLCJlbmNyeXB0ZWRfdmFs\ndWUiOiJtYVZ0TUgwMGNWK0J0MmZLZzRjOWVub0NIWHV6YUpjcHlDRjJ0S0Y0\nNEViaktubkI3Mi9ucC82THhhSU02RzRpTWN3ODZmdG05bGVTK01OSCIsInZp\nc2liaWxpdHkiOiJwcml2YXRlIn0=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 201, + "message": "Created" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 22:58:54 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "\"d5f61838397b8a0e30906d08a5e681f131eabf9bd1f7c651aca95cefa97824f8\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4930" + ], + "X-Ratelimit-Reset": [ + "1702422736" + ], + "X-Ratelimit-Used": [ + "70" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C9DF:5870:B82929:BDE800:6578E5AE" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 22:58:54 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_without_secrets/_list_org_actions_secrets/returns_empty_list_of_secrets.json b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_without_secrets/_list_org_actions_secrets/returns_empty_list_of_secrets.json new file mode 100644 index 000000000..c1575bf86 --- /dev/null +++ b/spec/cassettes/Octokit_Client_ActionsSecrets/with_an_org_without_secrets/_list_org_actions_secrets/returns_empty_list_of_secrets.json @@ -0,0 +1,124 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//actions/secrets", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 21:59:16 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"beb6cae5ef946ee4ac4913986e76dc98598219b95a1bc51d6b40123d39650367\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4988" + ], + "X-Ratelimit-Reset": [ + "1702418555" + ], + "X-Ratelimit-Used": [ + "12" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "C7B5:915F:9B885A:A09DF1:6578D7B4" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6MCwic2VjcmV0cyI6W119\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 21:59:16 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org/_get_org_codespaces_public_key/get_org_specific_public_key_for_secrets_encryption.json b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org/_get_org_codespaces_public_key/get_org_specific_public_key_for_secrets_encryption.json new file mode 100644 index 000000000..ef6cb4696 --- /dev/null +++ b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org/_get_org_codespaces_public_key/get_org_specific_public_key_for_secrets_encryption.json @@ -0,0 +1,124 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:30 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9636914981549ffebb4d95ca14ca0cc7ac4e3ecee07648f54f3becd54ae01da7\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4935" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "65" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CBAE:7D76:BC1A6:C16F3:6578EEBA" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwia2V5IjoiTTYxMm4v\nTFprbG5uRVZYVmVZczIwRHRvK1NmaFlhV0IwNWozVTBBcFRTcz0ifQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:30 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_create_or_update_org_codespaces_secret/updating_existing_secret_returns_204.json b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_create_or_update_org_codespaces_secret/updating_existing_secret_returns_204.json new file mode 100644 index 000000000..8c17221c3 --- /dev/null +++ b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_create_or_update_org_codespaces_secret/updating_existing_secret_returns_204.json @@ -0,0 +1,561 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:26 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9636914981549ffebb4d95ca14ca0cc7ac4e3ecee07648f54f3becd54ae01da7\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4950" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "50" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB9F:7720:A2955:A7DCB:6578EEB6" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwia2V5IjoiTTYxMm4v\nTFprbG5uRVZYVmVZczIwRHRvK1NmaFlhV0IwNWozVTBBcFRTcz0ifQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:26 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiYzZxTTY3amJ0b244N244cHdMZlM2Z2duU1NsQVBiT3IveXEwdldw\nVTNXRjNqYkxHWVNxbU5yZXQ0MjllL0lOeXZrRFM2dnpLcDdBZkN1L2QiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:26 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4949" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "51" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CBA0:1012:A007B:A5606:6578EEB6" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:26 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiVXIxNXkvUFhpR3JTOXVCQ3llUjM4TUtyL1V5VjBUZ3VaM3NiWWhQ\nS2RSWHFDdGNQd2ZPNG4wVDJ0dHIycnZleVh5dnpXcTJhR3EyWWo5SXdMdz09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:26 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4948" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "52" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CBA1:1160:A790B:ACDA3:6578EEB6" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:26 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:26 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9636914981549ffebb4d95ca14ca0cc7ac4e3ecee07648f54f3becd54ae01da7\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4947" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "53" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CBA2:87E2:96507:9BA14:6578EEB6" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwia2V5IjoiTTYxMm4v\nTFprbG5uRVZYVmVZczIwRHRvK1NmaFlhV0IwNWozVTBBcFRTcz0ifQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:26 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiQ2dkcXZQT0ZXVGZXeGQ3ZEdlRE1jZUY2K3RZcmZIZlRzMmZ4czZ3\nQU94UFFwaWtIWGVXNlBpQ0M5UXUrVG1OQ1VJWHNtQkxQdlZEMSIsInZpc2li\naWxpdHkiOiJwcml2YXRlIn0=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:27 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4946" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "54" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CBA3:1D20:94677:99C05:6578EEB7" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:27 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_delete_org_codespaces_secret/delete_existing_secret.json b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_delete_org_codespaces_secret/delete_existing_secret.json new file mode 100644 index 000000000..a867c4954 --- /dev/null +++ b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_delete_org_codespaces_secret/delete_existing_secret.json @@ -0,0 +1,442 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:28 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9636914981549ffebb4d95ca14ca0cc7ac4e3ecee07648f54f3becd54ae01da7\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4941" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "59" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CBA8:37E4:9B0FC:A0695:6578EEB8" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwia2V5IjoiTTYxMm4v\nTFprbG5uRVZYVmVZczIwRHRvK1NmaFlhV0IwNWozVTBBcFRTcz0ifQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:28 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiS0JUbTN2cHFoOU1BaXRiVHZsbm5Ic0NiRXpEWVRNMWJqRXRobUxz\nMWtCZCtFWDRNeURHTkZoL2ttd2NXa2FwVXpIK2dYWGFNRDluSFdkTjQiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:28 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4940" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "60" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CBA9:37E4:9B13E:A06D1:6578EEB8" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:28 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoieTdLb29Hb01GTE9nTzFNQTFTcStqbXFJMWlDYnIyTFhqcHF2V3hk\nYy9ua1NjN1ZHTlJkY04xb0N6Z3NjN0VHZTdDamZjRUF4WVBNenI3Vm42dz09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:29 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4939" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "61" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CBAA:37E4:9B172:A071C:6578EEB8" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:29 GMT" + }, + { + "request": { + "method": "delete", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:29 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4938" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "62" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CBAB:98CE:97E67:9D305:6578EEB9" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:29 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_get_org_codespaces_secret/return_timestamps_related_to_one_secret.json b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_get_org_codespaces_secret/return_timestamps_related_to_one_secret.json new file mode 100644 index 000000000..4827ed106 --- /dev/null +++ b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_get_org_codespaces_secret/return_timestamps_related_to_one_secret.json @@ -0,0 +1,455 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:27 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9636914981549ffebb4d95ca14ca0cc7ac4e3ecee07648f54f3becd54ae01da7\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4945" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "55" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CBA4:2345:97A6D:9CFFC:6578EEB7" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwia2V5IjoiTTYxMm4v\nTFprbG5uRVZYVmVZczIwRHRvK1NmaFlhV0IwNWozVTBBcFRTcz0ifQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:27 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiYW9KVGFPQUtoLzFmR1FXK2hacyswcVJ6M2JDTWcxRTFWL29WTk1G\ndFcxM1BsS0dBU1FlMldpdXZtMlZTNG9WSVZoR3NZeTNUVU96QzFaazIiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:27 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4944" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "56" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CBA5:891E:A5CE1:AB276:6578EEB7" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:27 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiT0xBaGY4YWxMNmVtQjFjWk5QQlljVnRyOUZSMlNaYWFwRDhGeUNQ\nendseUpoVll1eVdEM082VklxVHc1UVNzaVdzcDBEZ0Q2SjlYK003OVM4QT09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:28 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4943" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "57" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CBA6:7D76:BBE2E:C1349:6578EEB7" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:28 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:28 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"5fa19ff508e49419df445491123e06a20c4aec864715b351d14721f15d8cdac6\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4942" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "58" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CBA7:891E:A5D94:AB32C:6578EEB8" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJuYW1lIjoiU0VDUkVUX05BTUUiLCJjcmVhdGVkX2F0IjoiMjAyMy0xMi0x\nMlQyMzozNzoyM1oiLCJ1cGRhdGVkX2F0IjoiMjAyMy0xMi0xMlQyMzozNzoy\nOFoiLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:28 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_list_org_codespaces_secrets/auto-paginates_the_results.json b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_list_org_codespaces_secrets/auto-paginates_the_results.json new file mode 100644 index 000000000..0bb6aaef2 --- /dev/null +++ b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_list_org_codespaces_secrets/auto-paginates_the_results.json @@ -0,0 +1,580 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:24 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9636914981549ffebb4d95ca14ca0cc7ac4e3ecee07648f54f3becd54ae01da7\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4955" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "45" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB9A:87E2:96267:9B76D:6578EEB4" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwia2V5IjoiTTYxMm4v\nTFprbG5uRVZYVmVZczIwRHRvK1NmaFlhV0IwNWozVTBBcFRTcz0ifQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:24 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoia0M3bk9HalZtUFdXRGRNN0lVOCtRQWVrMCt3SEtDSW9qOVdaK1RX\nZ0J6ekhyRUdsMTJuYVN4SjlPMmhCbEpkMkZOQlk1Uk9peWVrcmZwdzgiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:25 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4954" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "46" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CB9B:359F:B4B52:B9FC0:6578EEB4" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:25 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiZEtmc00xRGgzeXh2eWxKZmV1Tk5vZ1V1ckwwbDNWOUlQckQ4QVAy\nVXZWY2FNaUFQZC83OXBjK1B2U3ZZZ2gxd0trdXEwcDZLbjBMWmJwYUlQZz09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:25 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4953" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "47" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CB9C:9A5D:954CD:9A93A:6578EEB5" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:25 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets?per_page=1", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:25 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"468f9e05a666fedfbb9403ea5d8afb4842b77d0efc1a9b02acc3ed148116d1c2\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "Link": [ + "; rel=\"next\", ; rel=\"last\"" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4952" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "48" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB9D:9A5D:95524:9A995:6578EEB5" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FIiwiY3JlYXRlZF9hdCI6IjIwMjMtMTItMTJUMjM6Mzc6MjNaIiwidXBk\nYXRlZF9hdCI6IjIwMjMtMTItMTJUMjM6Mzc6MjVaIiwidmlzaWJpbGl0eSI6\nInByaXZhdGUifV19\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:25 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/organizations/64329988/codespaces/secrets?page=2&per_page=1", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:25 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"a27163371d06cc94d3487dc518a89130362e1908a69e68060f632f78a1990046\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "Link": [ + "; rel=\"prev\", ; rel=\"first\"" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4951" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "49" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB9E:188C:9822C:9D6AB:6578EEB5" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FMiIsImNyZWF0ZWRfYXQiOiIyMDIzLTEyLTEyVDIzOjM3OjIzWiIsInVw\nZGF0ZWRfYXQiOiIyMDIzLTEyLTEyVDIzOjM3OjI1WiIsInZpc2liaWxpdHki\nOiJwcml2YXRlIn1dfQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:25 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_list_org_codespaces_secrets/paginates_the_results.json b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_list_org_codespaces_secrets/paginates_the_results.json new file mode 100644 index 000000000..bd5ea1c36 --- /dev/null +++ b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_list_org_codespaces_secrets/paginates_the_results.json @@ -0,0 +1,484 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:22 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9636914981549ffebb4d95ca14ca0cc7ac4e3ecee07648f54f3becd54ae01da7\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4963" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "37" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB92:0689:96F09:9C366:6578EEB2" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwia2V5IjoiTTYxMm4v\nTFprbG5uRVZYVmVZczIwRHRvK1NmaFlhV0IwNWozVTBBcFRTcz0ifQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:22 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiSDZhZkc1WXFDa2RjY1RTeGtvUkxhTy9vSFVnT2x6VGcrYUw1bkp4\nNW5CMXBjdU9vUzFibFBuOHQydkVzcGFyOVlnSWJFSHVrUE5OdGJJeUoiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 201, + "message": "Created" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:23 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "\"d5f61838397b8a0e30906d08a5e681f131eabf9bd1f7c651aca95cefa97824f8\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4962" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "38" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB93:0EA0:9694D:9BD97:6578EEB2" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:23 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiUHh5Z0tBQUhNZUhOSG5vejE5UmhMclRIeitrV3MreTB1UU1sMDdV\nWDNHbGdMaCtDWnhYZTd4em0rMVZmNWZJSjY0a2pHMVN3ckhsckk4RnBTUT09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 201, + "message": "Created" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:23 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "\"d5f61838397b8a0e30906d08a5e681f131eabf9bd1f7c651aca95cefa97824f8\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4961" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "39" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB94:1D20:94152:996AB:6578EEB3" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:23 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets?per_page=1", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:23 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"c1e4a5ef444fc060a81e694cf7fe5fda6af2042547fb2804073441934741a3fb\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "Link": [ + "; rel=\"next\", ; rel=\"last\"" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4960" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "40" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB95:1012:9FCFB:A5265:6578EEB3" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FIiwiY3JlYXRlZF9hdCI6IjIwMjMtMTItMTJUMjM6Mzc6MjNaIiwidXBk\nYXRlZF9hdCI6IjIwMjMtMTItMTJUMjM6Mzc6MjNaIiwidmlzaWJpbGl0eSI6\nInByaXZhdGUifV19\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:23 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_list_org_codespaces_secrets/returns_list_of_two_secrets.json b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_list_org_codespaces_secrets/returns_list_of_two_secrets.json new file mode 100644 index 000000000..7c1bd3380 --- /dev/null +++ b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_with_a_secret/_list_org_codespaces_secrets/returns_list_of_two_secrets.json @@ -0,0 +1,455 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:23 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9636914981549ffebb4d95ca14ca0cc7ac4e3ecee07648f54f3becd54ae01da7\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4959" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "41" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB96:37E4:9ABBE:A0146:6578EEB3" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwia2V5IjoiTTYxMm4v\nTFprbG5uRVZYVmVZczIwRHRvK1NmaFlhV0IwNWozVTBBcFRTcz0ifQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:23 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiNUJvN29RTzlTenIxSjFDRWw3WG8wSFYzLzhGZ0VYSGU0bHAwQ0hs\nbmhoeHNqV1VxNmdSVHdnUjNEb09SRVQ2Sm9VTzVaU1U5MWhaSVdUeEoiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:24 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4958" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "42" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CB97:359F:B4A03:B9E69:6578EEB3" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:24 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiMEtraHd2RWFXcnROemlHTFU5L1p4MXpHY3A3WG4vYzNlSDlJVTYx\nQnZ6TWF0N29UazFIajYxS1JhVmhVQjBtZ25zandHZmEzczE0L0hJVzJPZz09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:24 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4957" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "43" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "CB98:1012:9FDE4:A5360:6578EEB4" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:24 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:37:24 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"5ec39d277e15490293edb9bb3270dd8ebf557288c4f4716720de15f0f6028d28\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4956" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "44" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CB99:891E:A58DE:AAE47:6578EEB4" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FIiwiY3JlYXRlZF9hdCI6IjIwMjMtMTItMTJUMjM6Mzc6MjNaIiwidXBk\nYXRlZF9hdCI6IjIwMjMtMTItMTJUMjM6Mzc6MjRaIiwidmlzaWJpbGl0eSI6\nInByaXZhdGUifSx7Im5hbWUiOiJTRUNSRVRfTkFNRTIiLCJjcmVhdGVkX2F0\nIjoiMjAyMy0xMi0xMlQyMzozNzoyM1oiLCJ1cGRhdGVkX2F0IjoiMjAyMy0x\nMi0xMlQyMzozNzoyNFoiLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9XX0=\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:37:24 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_without_secrets/_create_or_update_org_codespaces_secret/creating_secret_returns_201.json b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_without_secrets/_create_or_update_org_codespaces_secret/creating_secret_returns_201.json new file mode 100644 index 000000000..742bc7286 --- /dev/null +++ b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_without_secrets/_create_or_update_org_codespaces_secret/creating_secret_returns_201.json @@ -0,0 +1,243 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:39:38 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9636914981549ffebb4d95ca14ca0cc7ac4e3ecee07648f54f3becd54ae01da7\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4934" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "66" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CBBA:359F:BF640:C504B:6578EF3A" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwia2V5IjoiTTYxMm4v\nTFprbG5uRVZYVmVZczIwRHRvK1NmaFlhV0IwNWozVTBBcFRTcz0ifQ==\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:39:38 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//codespaces/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxNzA0MjczMTQ0NTY2OTg0NzQyIiwiZW5jcnlwdGVkX3Zh\nbHVlIjoibDdjT2IwU2NPaTZOWGVnemppWVB6OVFaeVJWdG9qeEptWDd5U2tM\nbmdVNmZnN04xTUNLOVZGaUk1STlod3FMbWRJdFhDVm1xdVZFSitvaDEiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 201, + "message": "Created" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:39:38 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "\"d5f61838397b8a0e30906d08a5e681f131eabf9bd1f7c651aca95cefa97824f8\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4933" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "67" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CBBB:359F:BF682:C5090:6578EF3A" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:39:38 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_without_secrets/_list_org_codespaces_secrets/returns_empty_list_of_secrets.json b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_without_secrets/_list_org_codespaces_secrets/returns_empty_list_of_secrets.json new file mode 100644 index 000000000..66f61fa89 --- /dev/null +++ b/spec/cassettes/Octokit_Client_CodespacesSecrets/with_an_org_without_secrets/_list_org_codespaces_secrets/returns_empty_list_of_secrets.json @@ -0,0 +1,124 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//codespaces/secrets", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Tue, 12 Dec 2023 23:40:19 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"beb6cae5ef946ee4ac4913986e76dc98598219b95a1bc51d6b40123d39650367\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2023-12-19 21:50:28 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4931" + ], + "X-Ratelimit-Reset": [ + "1702427579" + ], + "X-Ratelimit-Used": [ + "69" + ], + "X-Ratelimit-Resource": [ + "codespaces" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "CBC2:1160:B2BA6:B8798:6578EF63" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6MCwic2VjcmV0cyI6W119\n" + } + }, + "recorded_at": "Tue, 12 Dec 2023 23:40:19 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org/_get_org_dependabot_public_key/get_org_specific_public_key_for_secrets_encryption.json b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org/_get_org_dependabot_public_key/get_org_specific_public_key_for_secrets_encryption.json new file mode 100644 index 000000000..2d6829d85 --- /dev/null +++ b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org/_get_org_dependabot_public_key/get_org_specific_public_key_for_secrets_encryption.json @@ -0,0 +1,124 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:00:08 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"82a59d6697d13141de5dfd5ccbe52297df5e98a6302ca98d0c7ce0fb0d4e8591\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4998" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "2" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DADD:7C75:8355275:8968A79:65970038" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3Iiwia2V5IjoiOU1Zc0Zx\nb3dTS09iRmpVc2JlUWxYaGdJTEVjOENpc1J1dXU3NHcxV1FEVT0ifQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:00:08 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_create_or_update_org_dependabot_secret/updating_existing_secret_returns_204.json b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_create_or_update_org_dependabot_secret/updating_existing_secret_returns_204.json new file mode 100644 index 000000000..f5576378b --- /dev/null +++ b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_create_or_update_org_dependabot_secret/updating_existing_secret_returns_204.json @@ -0,0 +1,561 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:29 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"82a59d6697d13141de5dfd5ccbe52297df5e98a6302ca98d0c7ce0fb0d4e8591\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4993" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "7" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DAFF:0DE0:30F163A:32C00B1:659700C5" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3Iiwia2V5IjoiOU1Zc0Zx\nb3dTS09iRmpVc2JlUWxYaGdJTEVjOENpc1J1dXU3NHcxV1FEVT0ifQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:29 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiUGtRb0hhK1VxV2YyUmtmWXNhZ2t4cHZRVTZyZmtlckFWOVJJM2da\nV25oZUNEVGQ3NkVHL3E1Q2xLWThRYkl1YmNMWnNramxxVE0rc093ZHIiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:29 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4992" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "8" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB00:8638:656A10A:69CA361:659700C5" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:30 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiU1ZPRXFZTDhEUjdIV1FxY3dIQnhhYmxSSDNuNTVoRUw3SW4rOWhN\nVWxpKzY1bGF6SG9oOEhOcHJjZjQ0eW4zY0VTWWNKOVduOU9mYzZmT2lOdz09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:30 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4991" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "9" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB01:5648:803B3A5:859E7EA:659700C6" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:30 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:30 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"82a59d6697d13141de5dfd5ccbe52297df5e98a6302ca98d0c7ce0fb0d4e8591\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4990" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "10" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB02:91CA:624F8EA:6570971:659700C6" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3Iiwia2V5IjoiOU1Zc0Zx\nb3dTS09iRmpVc2JlUWxYaGdJTEVjOENpc1J1dXU3NHcxV1FEVT0ifQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:30 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoieU1jcUxpa0JJaklDUXRHanR1SDVaZ3ZCUUZzOGNFVTB2UzhxV2ov\ncWlYWDZ3VW5VQXJhczlNVmNiRUJGL3pjeVVYTDJ3YUhOQ3JOeCIsInZpc2li\naWxpdHkiOiJwcml2YXRlIn0=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:30 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4989" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "11" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB03:0E13:24490B:2575C1:659700C6" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:30 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_delete_org_dependabot_secret/delete_existing_secret.json b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_delete_org_dependabot_secret/delete_existing_secret.json new file mode 100644 index 000000000..35d0b90ee --- /dev/null +++ b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_delete_org_dependabot_secret/delete_existing_secret.json @@ -0,0 +1,442 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:33 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"82a59d6697d13141de5dfd5ccbe52297df5e98a6302ca98d0c7ce0fb0d4e8591\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4975" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "25" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB11:766D:349070C:3693517:659700C9" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3Iiwia2V5IjoiOU1Zc0Zx\nb3dTS09iRmpVc2JlUWxYaGdJTEVjOENpc1J1dXU3NHcxV1FEVT0ifQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:33 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiVjZmeDJjalJpU1NuUnJLMlpFRUx6ek9OVmhOTHJVZGpyS05sRGZp\nZ0dHdU5DTnMxRTc4ZTR4ZFlpeWxrcWtBZDVWNnFhakRsNzByV3YvVWoiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:34 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4974" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "26" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB12:0DE0:30F1CB2:32C075A:659700C9" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:34 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiNTJDTVNXSFVVZ3I1RTFPWHdmcU1jNmxlQnlueDRsR2RXVFdDNXNR\ndmlYK1d5YW9qMkpCdW1FZU9ySTZHU3lXNUEvN05TWTA3NkJRbEI1S29Sdz09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:34 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4973" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "27" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB13:91CA:625008F:6571141:659700CA" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:34 GMT" + }, + { + "request": { + "method": "delete", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:34 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4972" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "28" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB14:5648:803B9A1:859EE15:659700CA" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:34 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_get_org_dependabot_secret/return_timestamps_related_to_one_secret.json b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_get_org_dependabot_secret/return_timestamps_related_to_one_secret.json new file mode 100644 index 000000000..8574bc6c7 --- /dev/null +++ b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_get_org_dependabot_secret/return_timestamps_related_to_one_secret.json @@ -0,0 +1,481 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:28 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"82a59d6697d13141de5dfd5ccbe52297df5e98a6302ca98d0c7ce0fb0d4e8591\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4997" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "3" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DAFB:0E08:2904E2C:2A8F21C:659700C4" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3Iiwia2V5IjoiOU1Zc0Zx\nb3dTS09iRmpVc2JlUWxYaGdJTEVjOENpc1J1dXU3NHcxV1FEVT0ifQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:28 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiaGVhZmJFQlNvdnVKNFF4UDE0S3VENHNYQW40NUx4TGRmSVBSamZF\naitTQU83TXFsWERsOHdNNmRVbGdDcDVZWHJRVHlqL3E5bmpZM3E0RmMiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 201, + "message": "Created" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:29 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "\"9df66c73c0c15211004dff2da29c1e745ba6ccfb0f7e12593e0527dd280aad5a\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4996" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "4" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DAFC:0E13:24471B:2573B9:659700C4" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:29 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoidzllNks3eE9PRm8wMHpITTZuS3BiZVlMVTBZUWliKzhBREVxYnht\nUm8yNFRCejFHajQ1NjVSZHYwVnUza0lzaU5BN1dxRkZHSTBMTjRtUHNydz09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 201, + "message": "Created" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:29 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "\"9df66c73c0c15211004dff2da29c1e745ba6ccfb0f7e12593e0527dd280aad5a\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4995" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "5" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DAFD:0E17:2D6786B:2F1B8DE:659700C5" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:29 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:29 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"b12e3a73ae69d3cca74588ee1a33da77613f02f193226e0a0cd17d3e052f882a\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4994" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "6" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DAFE:1782:18545B2:19382C3:659700C5" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJuYW1lIjoiU0VDUkVUX05BTUUiLCJjcmVhdGVkX2F0IjoiMjAyNC0wMS0w\nNFQxOTowMjoyOVoiLCJ1cGRhdGVkX2F0IjoiMjAyNC0wMS0wNFQxOTowMjoy\nOVoiLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:29 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_list_org_dependabot_secrets/auto-paginates_the_results.json b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_list_org_dependabot_secrets/auto-paginates_the_results.json new file mode 100644 index 000000000..d6967ce64 --- /dev/null +++ b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_list_org_dependabot_secrets/auto-paginates_the_results.json @@ -0,0 +1,580 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:32 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"82a59d6697d13141de5dfd5ccbe52297df5e98a6302ca98d0c7ce0fb0d4e8591\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4980" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "20" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB0C:0E08:2905444:2A8F85E:659700C8" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3Iiwia2V5IjoiOU1Zc0Zx\nb3dTS09iRmpVc2JlUWxYaGdJTEVjOENpc1J1dXU3NHcxV1FEVT0ifQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:32 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoidk1xRGM0NUl4TjVPUzliQ1lOTFRZaUl1N04wSW11V1BMMlYvMmZR\nUVRBNmdqUFBRMGxiWWUvQkhRMDFGTEFyWkpmTWlrcG1nVXA1bmU4UG4iLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:32 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4979" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "21" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB0D:0E08:290547D:2A8F8A3:659700C8" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:33 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiOG9xYks5dCtWaGl4UTZqM1JGdHFBNXozODFCdUtockFTcWJ1YXFW\neUJoUFBBTWwyZHM3TFZMck1uMlhpTWJDcHRCaElVYUpobHErd3dWOFdrUT09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:33 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4978" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "22" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB0E:2DFA:67217E0:6BC062A:659700C9" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:33 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets?per_page=1", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:33 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"6656851b1f36adb593b21017a2f2760be6b3e3a519194174db1de385c2d30e22\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "Link": [ + "; rel=\"next\", ; rel=\"last\"" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4977" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "23" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB0F:7E6B:536E368:56C5B6F:659700C9" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FIiwiY3JlYXRlZF9hdCI6IjIwMjQtMDEtMDRUMTk6MDI6MjlaIiwidXBk\nYXRlZF9hdCI6IjIwMjQtMDEtMDRUMTk6MDI6MzNaIiwidmlzaWJpbGl0eSI6\nInByaXZhdGUifV19\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:33 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/organizations/64329988/dependabot/secrets?page=2&per_page=1", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:33 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"e10402f05f72f425926a9adffcc455ea212c656d0c0dd5a1e581fc4666e60e53\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "Link": [ + "; rel=\"prev\", ; rel=\"first\"" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4976" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "24" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB10:8638:656A65C:69CA8D1:659700C9" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FMiIsImNyZWF0ZWRfYXQiOiIyMDI0LTAxLTA0VDE5OjAyOjI5WiIsInVw\nZGF0ZWRfYXQiOiIyMDI0LTAxLTA0VDE5OjAyOjMzWiIsInZpc2liaWxpdHki\nOiJwcml2YXRlIn1dfQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:33 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_list_org_dependabot_secrets/paginates_the_results.json b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_list_org_dependabot_secrets/paginates_the_results.json new file mode 100644 index 000000000..bc5fa5ed5 --- /dev/null +++ b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_list_org_dependabot_secrets/paginates_the_results.json @@ -0,0 +1,458 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:30 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"82a59d6697d13141de5dfd5ccbe52297df5e98a6302ca98d0c7ce0fb0d4e8591\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4988" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "12" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB04:49A7:5F8A428:63B2DA4:659700C6" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3Iiwia2V5IjoiOU1Zc0Zx\nb3dTS09iRmpVc2JlUWxYaGdJTEVjOENpc1J1dXU3NHcxV1FEVT0ifQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:30 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiZUhYem5DSWlKdFF6M3k0YjBmWVdYUytpNWl2Uy9jNGRUdDZ1emEr\nNEF5dlgrVFZBZzRxL0lVcWMyOUdqeVFkbXo2eWsvL3VMa2Y4azlUS3AiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:31 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4987" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "13" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB05:0E25:26A8679:28226D0:659700C7" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:31 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiOWU3WEM1cTB2MmpGbzhrVlA3ciszbVNDb3RlUk1ERXhENEZvWVBm\nM0JRVDMzeko0WFdOQlgwTmVUMFVzalNWVmd1b2g2VktIVzhtS0dHV1NaUT09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:31 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4986" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "14" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB06:0E08:2905214:2A8F63C:659700C7" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:31 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets?per_page=1", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:31 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"d554489a080ed6a1b1fa79162d6d5175f8681a846eb69975e3f9754e0d3b8eb3\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "Link": [ + "; rel=\"next\", ; rel=\"last\"" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4985" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "15" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB07:0E0B:241C04F:2580E49:659700C7" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FIiwiY3JlYXRlZF9hdCI6IjIwMjQtMDEtMDRUMTk6MDI6MjlaIiwidXBk\nYXRlZF9hdCI6IjIwMjQtMDEtMDRUMTk6MDI6MzFaIiwidmlzaWJpbGl0eSI6\nInByaXZhdGUifV19\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:31 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_list_org_dependabot_secrets/returns_list_of_two_secrets.json b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_list_org_dependabot_secrets/returns_list_of_two_secrets.json new file mode 100644 index 000000000..8f24ec04c --- /dev/null +++ b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_with_a_secret/_list_org_dependabot_secrets/returns_list_of_two_secrets.json @@ -0,0 +1,455 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:31 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"82a59d6697d13141de5dfd5ccbe52297df5e98a6302ca98d0c7ce0fb0d4e8591\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4984" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "16" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB08:0DE7:2CF0642:2E8F7C1:659700C7" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3Iiwia2V5IjoiOU1Zc0Zx\nb3dTS09iRmpVc2JlUWxYaGdJTEVjOENpc1J1dXU3NHcxV1FEVT0ifQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:31 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiY1RsRmVwaG9acHVOM3BPVXF5UXBodHRzY2cvKzlrN1NDeHpnYWhh\ncy9rc09KTTRkcTQ0V1NocCthUFVzMktjbUQyak55OVE3dzZRNFdXMUQiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:32 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4983" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "17" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB09:8638:656A413:69CA686:659700C7" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:32 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name2", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiK29DTEhzNkZOZUJHT01temRpL253V1B6YlRDd0kvSVBFVjJNL1B5\nTjhBekJvaW42a0FXdVhIM09TWWhpajFIWUpRWGNTSFhtenhYbGNmRzVOUT09\nIiwidmlzaWJpbGl0eSI6InByaXZhdGUifQ==\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:32 GMT" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4982" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "18" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Vary": [ + "Accept-Encoding, Accept, X-Requested-With" + ], + "X-Github-Request-Id": [ + "DB0A:8638:656A471:69CA6DD:659700C8" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:32 GMT" + }, + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:02:32 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"e13581ee48a5005eafcb73184e342f0d70c805bca223f6600e577472e1f954d3\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4981" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "19" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB0B:0E25:26A884C:28228B4:659700C8" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6Miwic2VjcmV0cyI6W3sibmFtZSI6IlNFQ1JFVF9O\nQU1FIiwiY3JlYXRlZF9hdCI6IjIwMjQtMDEtMDRUMTk6MDI6MjlaIiwidXBk\nYXRlZF9hdCI6IjIwMjQtMDEtMDRUMTk6MDI6MzJaIiwidmlzaWJpbGl0eSI6\nInByaXZhdGUifSx7Im5hbWUiOiJTRUNSRVRfTkFNRTIiLCJjcmVhdGVkX2F0\nIjoiMjAyNC0wMS0wNFQxOTowMjoyOVoiLCJ1cGRhdGVkX2F0IjoiMjAyNC0w\nMS0wNFQxOTowMjozMloiLCJ2aXNpYmlsaXR5IjoicHJpdmF0ZSJ9XX0=\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:02:32 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_without_secrets/_create_or_update_org_dependabot_secret/creating_secret_returns_201.json b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_without_secrets/_create_or_update_org_dependabot_secret/creating_secret_returns_201.json new file mode 100644 index 000000000..c3e73a31a --- /dev/null +++ b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_without_secrets/_create_or_update_org_dependabot_secret/creating_secret_returns_201.json @@ -0,0 +1,243 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets/public-key", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:04:29 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"82a59d6697d13141de5dfd5ccbe52297df5e98a6302ca98d0c7ce0fb0d4e8591\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4967" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "33" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB26:0E17:2D71BA1:2F2613A:6597013D" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3Iiwia2V5IjoiOU1Zc0Zx\nb3dTS09iRmpVc2JlUWxYaGdJTEVjOENpc1J1dXU3NHcxV1FEVT0ifQ==\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:04:29 GMT" + }, + { + "request": { + "method": "put", + "uri": "https://api.github.com/orgs//dependabot/secrets/secret_name", + "body": { + "encoding": "UTF-8", + "base64_string": "eyJrZXlfaWQiOiIxODI3NTUxOTM5NTcwNjI4NTM3IiwiZW5jcnlwdGVkX3Zh\nbHVlIjoiWjl0ek5adHU4eU1aRDJVbVV2am9nQW5oNG5Jei96Tno0bUFEUXVM\nNEZrT2ZYbEVIcFJxNkp1WFJtZ2VtWm5FMEswVEhTV1hqZHBYZWdpQmQiLCJ2\naXNpYmlsaXR5IjoicHJpdmF0ZSJ9\n" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 201, + "message": "Created" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:04:29 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "\"9df66c73c0c15211004dff2da29c1e745ba6ccfb0f7e12593e0527dd280aad5a\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4966" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "34" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB27:0268:479B775:4A647D9:6597013D" + ] + }, + "body": { + "encoding": "UTF-8", + "base64_string": "e30=\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:04:29 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_without_secrets/_list_org_dependabot_secrets/returns_empty_list_of_secrets.json b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_without_secrets/_list_org_dependabot_secrets/returns_empty_list_of_secrets.json new file mode 100644 index 000000000..b30289c51 --- /dev/null +++ b/spec/cassettes/Octokit_Client_DependabotSecrets/with_an_org_without_secrets/_list_org_dependabot_secrets/returns_empty_list_of_secrets.json @@ -0,0 +1,124 @@ +{ + "http_interactions": [ + { + "request": { + "method": "get", + "uri": "https://api.github.com/orgs//dependabot/secrets", + "body": { + "encoding": "US-ASCII", + "base64_string": "" + }, + "headers": { + "Accept": [ + "application/vnd.github.v3+json" + ], + "User-Agent": [ + "Octokit Ruby Gem 8.0.0" + ], + "Content-Type": [ + "application/json" + ], + "Authorization": [ + "token <>" + ], + "Accept-Encoding": [ + "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Server": [ + "GitHub.com" + ], + "Date": [ + "Thu, 04 Jan 2024 19:04:29 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Cache-Control": [ + "private, max-age=60, s-maxage=60" + ], + "Vary": [ + "Accept, Authorization, Cookie, X-GitHub-OTP", + "Accept-Encoding, Accept, X-Requested-With" + ], + "Etag": [ + "W/\"9544ce53c8cb9f429dbe25a8441dd6944bdff7518c92a55ed462f26d3a731084\"" + ], + "X-Oauth-Scopes": [ + "admin:org, repo" + ], + "X-Accepted-Oauth-Scopes": [ + "admin:org" + ], + "Github-Authentication-Token-Expiration": [ + "2024-01-11 18:57:19 UTC" + ], + "X-Github-Media-Type": [ + "github.v3; format=json" + ], + "X-Github-Api-Version-Selected": [ + "2022-11-28" + ], + "X-Ratelimit-Limit": [ + "5000" + ], + "X-Ratelimit-Remaining": [ + "4968" + ], + "X-Ratelimit-Reset": [ + "1704398283" + ], + "X-Ratelimit-Used": [ + "32" + ], + "X-Ratelimit-Resource": [ + "core" + ], + "Access-Control-Expose-Headers": [ + "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubdomains; preload" + ], + "X-Frame-Options": [ + "deny" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Xss-Protection": [ + "0" + ], + "Referrer-Policy": [ + "origin-when-cross-origin, strict-origin-when-cross-origin" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "X-Github-Request-Id": [ + "DB25:6CE4:6AA74B9:6F1E9E8:6597013D" + ] + }, + "body": { + "encoding": "ASCII-8BIT", + "base64_string": "eyJ0b3RhbF9jb3VudCI6MCwic2VjcmV0cyI6W119\n" + } + }, + "recorded_at": "Thu, 04 Jan 2024 19:04:29 GMT" + } + ], + "recorded_with": "VCR 6.2.0" +} \ No newline at end of file diff --git a/spec/octokit/client/actions_secrets_spec.rb b/spec/octokit/client/actions_secrets_spec.rb index 769e11c30..a82dbe6dd 100644 --- a/spec/octokit/client/actions_secrets_spec.rb +++ b/spec/octokit/client/actions_secrets_spec.rb @@ -254,4 +254,109 @@ def create_box(public_key) end end # .delete_actions_environment_secret end + + context 'with an org' do + describe '.get_org_actions_public_key', :vcr do + it 'get org public key for secrets encryption' do + box = create_box(@client.get_org_actions_public_key(test_github_org)) + expect(box[:key_id]).not_to be_empty + end + end # .get_org_actions_public_key + end + + context 'with an org without secrets' do + describe '.list_org_actions_secrets', :vcr do + it 'returns empty list of secrets' do + secrets = @client.list_org_actions_secrets(test_github_org) + expect(secrets.total_count).to eq(0) + expect(secrets.secrets).to be_empty + end + end # .list_org_actions_secrets + + describe '.create_or_update_org_actions_secret', :vcr do + it 'creating secret returns 201' do + box = create_box(@client.get_org_actions_public_key(test_github_org)) + encrypted = box[:box].encrypt(@secrets.first[:value]) + @client.create_or_update_org_actions_secret( + test_github_org, @secrets.first[:name], + key_id: box[:key_id], + encrypted_value: Base64.strict_encode64(encrypted), + visibility: 'private' + ) + expect(@client.last_response.status).to eq(201) + end + end # .create_or_update_org_actions_secret + end + + context 'with an org with a secret' do + before(:each) do + @box = create_box(@client.get_org_actions_public_key(test_github_org)) + @secrets.each do |secret| + encrypted = @box[:box].encrypt(secret[:value]) + @client.create_or_update_org_actions_secret( + test_github_org, secret[:name], + key_id: @box[:key_id], + encrypted_value: Base64.strict_encode64(encrypted), + visibility: 'private' + ) + end + end + + describe '.list_org_actions_secrets', :vcr do + it 'returns list of two secrets' do + secrets = @client.list_org_actions_secrets(test_github_org) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets[0].name).to eq(@secrets.first[:name].upcase) + end + + it 'paginates the results' do + @client.per_page = 1 + allow(@client).to receive(:paginate).and_call_original + secrets = @client.list_org_actions_secrets(test_github_org) + + expect(@client).to have_received(:paginate) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets.count).to eq(1) + end + + it 'auto-paginates the results' do + @client.auto_paginate = true + @client.per_page = 1 + allow(@client).to receive(:paginate).and_call_original + secrets = @client.list_org_actions_secrets(test_github_org) + + expect(@client).to have_received(:paginate) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets.count).to eq(2) + end + end # .list_org_actions_secrets + + describe '.get_org_actions_secret', :vcr do + it 'return timestamps related to one secret' do + received = @client.get_org_actions_secret(test_github_org, @secrets.first[:name]) + expect(received.name).to eq(@secrets.first[:name].upcase) + end + end # .get_org_actions_secret + + describe '.create_or_update_org_actions_secret', :vcr do + it 'updating existing secret returns 204' do + box = create_box(@client.get_org_actions_public_key(test_github_org)) + encrypted = box[:box].encrypt('new value') + @client.create_or_update_org_actions_secret( + test_github_org, @secrets.first[:name], + key_id: box[:key_id], + encrypted_value: Base64.strict_encode64(encrypted), + visibility: 'private' + ) + expect(@client.last_response.status).to eq(204) + end + end # .create_or_update_org_actions_secret + + describe '.delete_org_actions_secret', :vcr do + it 'delete existing secret' do + @client.delete_org_actions_secret(test_github_org, @secrets.first[:name]) + expect(@client.last_response.status).to eq(204) + end + end # .delete_org_actions_secret + end end diff --git a/spec/octokit/client/codespaces_secrets_spec.rb b/spec/octokit/client/codespaces_secrets_spec.rb index 2ccdcece0..c165be477 100644 --- a/spec/octokit/client/codespaces_secrets_spec.rb +++ b/spec/octokit/client/codespaces_secrets_spec.rb @@ -138,6 +138,111 @@ def create_box(public_key) @client.delete_codespaces_secret(@repo.id, @secrets.first[:name]) expect(@client.last_response.status).to eq(204) end + end # .delete_codespaces_secret + end + + context 'with an org' do + describe '.get_org_codespaces_public_key', :vcr do + it 'get org specific public key for secrets encryption' do + box = create_box(@client.get_org_codespaces_public_key(test_github_org)) + expect(box[:key_id]).not_to be_empty + end + end # .get_org_codespaces_public_key + end + + context 'with an org without secrets' do + describe '.list_org_codespaces_secrets', :vcr do + it 'returns empty list of secrets' do + secrets = @client.list_org_codespaces_secrets(test_github_org) + expect(secrets.total_count).to eq(0) + expect(secrets.secrets).to be_empty + end + end # .list_org_codespaces_secrets + + describe '.create_or_update_org_codespaces_secret', :vcr do + it 'creating secret returns 201' do + @box = create_box(@client.get_org_codespaces_public_key(test_github_org)) + encrypted = @box[:box].encrypt(@secrets.first[:value]) + @client.create_or_update_org_codespaces_secret( + test_github_org, @secrets.first[:name], + key_id: @box[:key_id], + encrypted_value: Base64.strict_encode64(encrypted), + visibility: 'private' + ) + expect(@client.last_response.status).to eq(201) + end + end # .create_or_update_org_codespaces_secret + end + + context 'with an org with a secret' do + before(:each) do + @box = create_box(@client.get_org_codespaces_public_key(test_github_org)) + @secrets.each do |secret| + encrypted = @box[:box].encrypt(secret[:value]) + @client.create_or_update_org_codespaces_secret( + test_github_org, secret[:name], + key_id: @box[:key_id], + encrypted_value: Base64.strict_encode64(encrypted), + visibility: 'private' + ) + end + end + + describe '.list_org_codespaces_secrets', :vcr do + it 'returns list of two secrets' do + secrets = @client.list_org_codespaces_secrets(test_github_org) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets[0].name).to eq(@secrets.first[:name].upcase) + end + + it 'paginates the results' do + @client.per_page = 1 + allow(@client).to receive(:paginate).and_call_original + secrets = @client.list_org_codespaces_secrets(test_github_org) + + expect(@client).to have_received(:paginate) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets.count).to eq(1) + end + + it 'auto-paginates the results' do + @client.auto_paginate = true + @client.per_page = 1 + allow(@client).to receive(:paginate).and_call_original + secrets = @client.list_org_codespaces_secrets(test_github_org) + + expect(@client).to have_received(:paginate) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets.count).to eq(2) + end + end # .list_org_codespaces_secrets + + describe '.get_org_codespaces_secret', :vcr do + it 'return timestamps related to one secret' do + received = @client.get_org_codespaces_secret(test_github_org, @secrets.first[:name]) + expect(received.name).to eq(@secrets.first[:name].upcase) + end + end # .get_org_codespaces_secret + + describe '.create_or_update_org_codespaces_secret', :vcr do + it 'updating existing secret returns 204' do + box = create_box(@client.get_org_codespaces_public_key(test_github_org)) + encrypted = box[:box].encrypt('new value') + @client.create_or_update_org_codespaces_secret( + test_github_org, @secrets.first[:name], + key_id: @box[:key_id], + encrypted_value: Base64.strict_encode64(encrypted), + visibility: 'private' + ) + expect(@client.last_response.status).to eq(204) + end + end # .create_or_update_org_codespaces_secret + + describe '.delete_org_codespaces_secret', :vcr do + it 'delete existing secret' do + @client.delete_org_codespaces_secret(test_github_org, @secrets.first[:name]) + expect(@client.last_response.status).to eq(204) + end end end end diff --git a/spec/octokit/client/dependabot_secrets_spec.rb b/spec/octokit/client/dependabot_secrets_spec.rb index fd579e631..4b0d24b35 100644 --- a/spec/octokit/client/dependabot_secrets_spec.rb +++ b/spec/octokit/client/dependabot_secrets_spec.rb @@ -140,4 +140,214 @@ def create_box(public_key) end end end + + context 'with an org' do + describe '.get_org_dependabot_public_key', :vcr do + it 'get org specific public key for secrets encryption' do + box = create_box(@client.get_org_dependabot_public_key(test_github_org)) + expect(box[:key_id]).not_to be_empty + end + end # .get_org_dependabot_public_key + end + + context 'with an org without secrets' do + describe '.list_org_dependabot_secrets', :vcr do + it 'returns empty list of secrets' do + secrets = @client.list_org_dependabot_secrets(test_github_org) + expect(secrets.total_count).to eq(0) + expect(secrets.secrets).to be_empty + end + end # .list_org_dependabot_secrets + + describe '.create_or_update_org_dependabot_secret', :vcr do + it 'creating secret returns 201' do + @box = create_box(@client.get_org_dependabot_public_key(test_github_org)) + encrypted = @box[:box].encrypt(@secrets.first[:value]) + @client.create_or_update_org_dependabot_secret( + test_github_org, @secrets.first[:name], + key_id: @box[:key_id], + encrypted_value: Base64.strict_encode64(encrypted), + visibility: 'private' + ) + expect(@client.last_response.status).to eq(201) + end + end # .create_or_update_org_dependabot_secret + end + + context 'with an org with a secret' do + before(:each) do + @box = create_box(@client.get_org_dependabot_public_key(test_github_org)) + @secrets.each do |secret| + encrypted = @box[:box].encrypt(secret[:value]) + @client.create_or_update_org_dependabot_secret( + test_github_org, secret[:name], + key_id: @box[:key_id], + encrypted_value: Base64.strict_encode64(encrypted), + visibility: 'private' + ) + end + end + + describe '.list_org_dependabot_secrets', :vcr do + it 'returns list of two secrets' do + secrets = @client.list_org_dependabot_secrets(test_github_org) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets[0].name).to eq(@secrets.first[:name].upcase) + end + + it 'paginates the results' do + @client.per_page = 1 + allow(@client).to receive(:paginate).and_call_original + secrets = @client.list_org_dependabot_secrets(test_github_org) + + expect(@client).to have_received(:paginate) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets.count).to eq(1) + end + + it 'auto-paginates the results' do + @client.auto_paginate = true + @client.per_page = 1 + allow(@client).to receive(:paginate).and_call_original + secrets = @client.list_org_dependabot_secrets(test_github_org) + + expect(@client).to have_received(:paginate) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets.count).to eq(2) + end + end # .list_org_dependabot_secrets + + describe '.get_org_dependabot_secret', :vcr do + it 'return timestamps related to one secret' do + received = @client.get_org_dependabot_secret(test_github_org, @secrets.first[:name]) + expect(received.name).to eq(@secrets.first[:name].upcase) + end + end # .get_org_dependabot_secret + + describe '.create_or_update_org_dependabot_secret', :vcr do + it 'updating existing secret returns 204' do + box = create_box(@client.get_org_dependabot_public_key(test_github_org)) + encrypted = box[:box].encrypt('new value') + @client.create_or_update_org_dependabot_secret( + test_github_org, @secrets.first[:name], + key_id: @box[:key_id], + encrypted_value: Base64.strict_encode64(encrypted), + visibility: 'private' + ) + expect(@client.last_response.status).to eq(204) + end + end # .create_or_update_org_dependabot_secret + + describe '.delete_org_dependabot_secret', :vcr do + it 'delete existing secret' do + @client.delete_org_dependabot_secret(test_github_org, @secrets.first[:name]) + expect(@client.last_response.status).to eq(204) + end + end + end + + context 'with a repo without secrets' do + before(:each) do + @repo = @client.create_repository('secret-repo') + end + + after(:each) do + @client.delete_repository(@repo.full_name) unless @repo.nil? + rescue Octokit::NotFound + end + + describe '.list_dependabot_secrets', :vcr do + it 'returns empty list of secrets' do + secrets = @client.list_dependabot_secrets(@repo.id) + expect(secrets.total_count).to eq(0) + expect(secrets.secrets).to be_empty + end + end # .list_dependabot_secrets + + describe '.create_or_update_dependabot_secret', :vcr do + it 'creating secret returns 201' do + box = create_box(@client.get_dependabot_public_key(@repo.id)) + encrypted = box[:box].encrypt(@secrets.first[:value]) + @client.create_or_update_dependabot_secret( + @repo.id, @secrets.first[:name], + key_id: box[:key_id], encrypted_value: Base64.strict_encode64(encrypted) + ) + expect(@client.last_response.status).to eq(201) + end + end # .create_or_update_dependabot_secret + end + + context 'with a repository with a secret' do + before(:each) do + @repo = @client.create_repository('secret-repo') + @box = create_box(@client.get_dependabot_public_key(@repo.id)) + @secrets.each do |secret| + encrypted = @box[:box].encrypt(secret[:value]) + @client.create_or_update_dependabot_secret( + @repo.id, secret[:name], + key_id: @box[:key_id], encrypted_value: Base64.strict_encode64(encrypted) + ) + end + end + + after(:each) do + @client.delete_repository(@repo.full_name) unless @repo.nil? + rescue Octokit::NotFound + end + + describe '.list_dependabot_secrets', :vcr do + it 'returns list of two secrets' do + secrets = @client.list_dependabot_secrets(@repo.id) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets[0].name).to eq(@secrets.first[:name].upcase) + end + + it 'paginates the results' do + @client.per_page = 1 + allow(@client).to receive(:paginate).and_call_original + secrets = @client.list_dependabot_secrets(@repo.id) + + expect(@client).to have_received(:paginate) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets.count).to eq(1) + end + + it 'auto-paginates the results' do + @client.auto_paginate = true + @client.per_page = 1 + allow(@client).to receive(:paginate).and_call_original + secrets = @client.list_dependabot_secrets(@repo.id) + + expect(@client).to have_received(:paginate) + expect(secrets.total_count).to eq(2) + expect(secrets.secrets.count).to eq(2) + end + end # .list_dependabot_secrets + + describe '.get_dependabot_secret', :vcr do + it 'return timestamps related to one secret' do + received = @client.get_dependabot_secret(@repo.id, @secrets.first[:name]) + expect(received.name).to eq(@secrets.first[:name].upcase) + end + end # .get_dependabot_secret + + describe '.create_or_update_dependabot_secret', :vcr do + it 'updating existing secret returns 204' do + box = create_box(@client.get_dependabot_public_key(@repo.id)) + encrypted = box[:box].encrypt('new value') + @client.create_or_update_dependabot_secret( + @repo.id, @secrets.first[:name], + key_id: box[:key_id], encrypted_value: Base64.strict_encode64(encrypted) + ) + expect(@client.last_response.status).to eq(204) + end + end # .create_or_update_dependabot_secret + + describe '.delete_dependabot_secret', :vcr do + it 'delete existing secret' do + @client.delete_dependabot_secret(@repo.id, @secrets.first[:name]) + expect(@client.last_response.status).to eq(204) + end + end + end end