123456789_123456789_123456789_123456789_123456789_

Module: Octokit::Client::ActionsSecrets

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/octokit/client/actions_secrets.rb

Overview

Methods for the Actions Secrets API

Instance Method Summary

Instance Method Details

#create_or_update_secret(repo, name, options)

Create or update secrets

Parameters:

  • repo (Integer, String, Hash, Repository)

    A GitHub repository

  • name (String)

    Name of secret

  • options (Hash)

    encrypted_value and key_id

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/actions_secrets.rb', line 43

def create_or_update_secret(repo, name, options)
  put "#{Repository.path repo}/actions/secrets/#{name}", options
end

#delete_secret(repo, name)

Delete a secret

Parameters:

  • repo (Integer, String, Hash, Repository)

    A GitHub repository

  • name (String)

    Name of secret

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/actions_secrets.rb', line 52

def delete_secret(repo, name)
  boolean_from_response :delete, "#{Repository.path repo}/actions/secrets/#{name}"
end

#get_public_key(repo) ⇒ Hash

Get public key for secrets encryption

Parameters:

  • repo (Integer, String, Hash, Repository)

    A GitHub repository

Returns:

  • (Hash)

    key_id and key

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/actions_secrets.rb', line 14

def get_public_key(repo)
  get "#{Repository.path repo}/actions/secrets/public-key"
end

#get_secret(repo, name) ⇒ Hash

Get a secret

Parameters:

  • repo (Integer, String, Hash, Repository)

    A GitHub repository

  • name (String)

    Name of secret

Returns:

  • (Hash)

    name, created_at and updated_at

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/actions_secrets.rb', line 33

def get_secret(repo, name)
  get "#{Repository.path repo}/actions/secrets/#{name}"
end

#list_secrets(repo) ⇒ Hash

List secrets

Parameters:

  • repo (Integer, String, Hash, Repository)

    A GitHub repository

Returns:

  • (Hash)

    total_count and list of secrets (each item is hash with name, created_at and updated_at)

See Also:

[ GitHub ]

  
# File 'lib/octokit/client/actions_secrets.rb', line 23

def list_secrets(repo)
  paginate "#{Repository.path repo}/actions/secrets"
end