Gitlab::Client::DeployKey
Defines methods related to deploy key.
Instance methods
create_deploy_key(project_id : Int32, title : String, key : String, form : Hash = {} of String => String) : JSON::Any
Create a deploy key in a project.
If the deploy key already exists in another project, it will be joined to current project only if original one was is accessible by the same user.
- param [Int32] project_id The ID of a project.
- param [String] title The title of new deploy key.
- param [String] key New deploy key.
- return [JSON::Any] Information about the created deploy key in a project.
client.create_deploy_key(1, "deploy server", "ssh-rsa xxx")
Get a deploy key in a project.
- param [Int32] project_id The ID of a project.
- param [String] key_id The ID of a deploy key.
- return [JSON::Any] Information about the deploy key in a project.
client.deploy_key(1, 1)
Gets a list deploy keys in a project.
- param [Int32] project_id The ID of a project.
- param [Hash] params A customizable set of params.
- option params [String] :page The page number.
- option params [String] :per_page The number of results per page. default is 20
- return [JSON::Any] List of issues under a project.
client.deploy_keys(1)
client.deploy_keys(1, {"per_page" => "10"})
Disables a deploy key at the project.
- param [Integer, String] project The ID or path of a project.
- param [Integer] key The ID of a deploy key.
- return [JSON::Any] Information about the enabled deploy key.
client.disable_deploy_key(42, 66)
Enables a deploy key at the project.
- param [Integer, String] project The ID or path of a project.
- param [Integer] key The ID of a deploy key.
- return [JSON::Any] Information about the enabled deploy key.
client.enable_deploy_key(42, 66)