Module: Octokit::Client::ActionsSecrets
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/actions_secrets.rb
Overview
Methods for the Actions Secrets API
Instance Method Summary collapse
-
#create_or_update_actions_environment_secret(repo, environment, name, options) ⇒ Object
Create or update an environment secret.
-
#create_or_update_actions_secret(repo, name, options) ⇒ Object
Create or update secrets.
-
#delete_actions_environment_secret(repo, environment, name) ⇒ Object
Delete environment secret.
-
#delete_actions_secret(repo, name) ⇒ Object
Delete a secret.
-
#get_actions_environment_public_key(repo, environment) ⇒ Hash
Get environment public key for secrets encryption.
-
#get_actions_environment_secret(repo, environment, name) ⇒ Hash
Get an environment secret.
-
#get_actions_public_key(repo) ⇒ Hash
Get public key for secrets encryption.
-
#get_actions_secret(repo, name) ⇒ Hash
Get a secret.
-
#list_actions_environment_secrets(repo, environment) ⇒ Hash
List environment secrets.
-
#list_actions_secrets(repo) ⇒ Hash
List secrets.
Instance Method Details
#create_or_update_actions_environment_secret(repo, environment, name, options) ⇒ Object
Create or update an environment secret
98 99 100 |
# File 'lib/octokit/client/actions_secrets.rb', line 98 def create_or_update_actions_environment_secret(repo, environment, name, ) put "#{Repository.path repo}/environments/#{environment}/secrets/#{name}", end |
#create_or_update_actions_secret(repo, name, options) ⇒ Object
Create or update secrets
45 46 47 |
# File 'lib/octokit/client/actions_secrets.rb', line 45 def create_or_update_actions_secret(repo, name, ) put "#{Repository.path repo}/actions/secrets/#{name}", end |
#delete_actions_environment_secret(repo, environment, name) ⇒ Object
Delete environment secret
107 108 109 |
# File 'lib/octokit/client/actions_secrets.rb', line 107 def delete_actions_environment_secret(repo, environment, name) boolean_from_response :delete, "#{Repository.path repo}/environments/#{environment}/secrets/#{name}" end |
#delete_actions_secret(repo, name) ⇒ Object
Delete a secret
54 55 56 |
# File 'lib/octokit/client/actions_secrets.rb', line 54 def delete_actions_secret(repo, name) boolean_from_response :delete, "#{Repository.path repo}/actions/secrets/#{name}" end |
#get_actions_environment_public_key(repo, environment) ⇒ Hash
Get environment public key for secrets encryption
64 65 66 |
# File 'lib/octokit/client/actions_secrets.rb', line 64 def get_actions_environment_public_key(repo, environment) get "#{Repository.path repo}/environments/#{environment}/secrets/public-key" end |
#get_actions_environment_secret(repo, environment, name) ⇒ Hash
Get an environment secret
87 88 89 |
# File 'lib/octokit/client/actions_secrets.rb', line 87 def get_actions_environment_secret(repo, environment, name) get "#{Repository.path repo}/environments/#{environment}/secrets/#{name}" end |
#get_actions_public_key(repo) ⇒ Hash
Get public key for secrets encryption
14 15 16 |
# File 'lib/octokit/client/actions_secrets.rb', line 14 def get_actions_public_key(repo) get "#{Repository.path repo}/actions/secrets/public-key" end |
#get_actions_secret(repo, name) ⇒ Hash
Get a secret
35 36 37 |
# File 'lib/octokit/client/actions_secrets.rb', line 35 def get_actions_secret(repo, name) get "#{Repository.path repo}/actions/secrets/#{name}" end |
#list_actions_environment_secrets(repo, environment) ⇒ Hash
List environment secrets
74 75 76 77 78 |
# File 'lib/octokit/client/actions_secrets.rb', line 74 def list_actions_environment_secrets(repo, environment) paginate "#{Repository.path repo}/environments/#{environment}/secrets" do |data, last_response| data.secrets.concat last_response.data.secrets end end |
#list_actions_secrets(repo) ⇒ Hash
List secrets
23 24 25 26 27 |
# File 'lib/octokit/client/actions_secrets.rb', line 23 def list_actions_secrets(repo) paginate "#{Repository.path repo}/actions/secrets" do |data, last_response| data.secrets.concat last_response.data.secrets end end |