Module: Octokit::Client::CodespacesSecrets
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/codespaces_secrets.rb
Overview
Methods for the Codespaces Secrets API
Instance Method Summary collapse
-
#create_or_update_codespaces_secret(repo, name, options) ⇒ Object
Create or update secrets.
-
#create_or_update_org_codespaces_secret(org, name, options) ⇒ Object
Create or update org secrets.
-
#delete_codespaces_secret(repo, name) ⇒ Object
Delete a secret.
-
#delete_org_codespaces_secret(org, name) ⇒ Object
Delete an org secret.
-
#get_codespaces_public_key(repo) ⇒ Hash
Get public key for secrets encryption.
-
#get_codespaces_secret(repo, name) ⇒ Hash
Get a secret.
-
#get_org_codespaces_public_key(org) ⇒ Hash
Get public key for secrets encryption.
-
#get_org_codespaces_secret(org, name) ⇒ Hash
Get an org secret.
-
#list_codespaces_secrets(repo) ⇒ Hash
List secrets.
-
#list_org_codespaces_secrets(org) ⇒ Hash
List org secrets.
Instance Method Details
#create_or_update_codespaces_secret(repo, name, options) ⇒ Object
Create or update secrets
75 76 77 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 75 def create_or_update_codespaces_secret(repo, name, ) put "#{Repository.path repo}/codespaces/secrets/#{name}", end |
#create_or_update_org_codespaces_secret(org, name, options) ⇒ Object
Create or update org secrets
85 86 87 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 85 def create_or_update_org_codespaces_secret(org, name, ) put "#{Organization.path org}/codespaces/secrets/#{name}", end |
#delete_codespaces_secret(repo, name) ⇒ Object
Delete a secret
94 95 96 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 94 def delete_codespaces_secret(repo, name) boolean_from_response :delete, "#{Repository.path repo}/codespaces/secrets/#{name}" end |
#delete_org_codespaces_secret(org, name) ⇒ Object
Delete an org secret
103 104 105 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 103 def delete_org_codespaces_secret(org, name) boolean_from_response :delete, "#{Organization.path org}/codespaces/secrets/#{name}" end |
#get_codespaces_public_key(repo) ⇒ Hash
Get public key for secrets encryption
14 15 16 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 14 def get_codespaces_public_key(repo) get "#{Repository.path repo}/codespaces/secrets/public-key" end |
#get_codespaces_secret(repo, name) ⇒ Hash
Get a secret
55 56 57 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 55 def get_codespaces_secret(repo, name) get "#{Repository.path repo}/codespaces/secrets/#{name}" end |
#get_org_codespaces_public_key(org) ⇒ Hash
Get public key for secrets encryption
23 24 25 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 23 def get_org_codespaces_public_key(org) get "#{Organization.path org}/codespaces/secrets/public-key" end |
#get_org_codespaces_secret(org, name) ⇒ Hash
Get an org secret
65 66 67 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 65 def get_org_codespaces_secret(org, name) get "#{Organization.path org}/codespaces/secrets/#{name}" end |
#list_codespaces_secrets(repo) ⇒ Hash
List secrets
32 33 34 35 36 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 32 def list_codespaces_secrets(repo) paginate "#{Repository.path repo}/codespaces/secrets" do |data, last_response| data.secrets.concat last_response.data.secrets end end |
#list_org_codespaces_secrets(org) ⇒ Hash
List org secrets
43 44 45 46 47 |
# File 'lib/octokit/client/codespaces_secrets.rb', line 43 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 |