Module: Octokit::Client::Deployments
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/octokit/client/deployments.rb |
Overview
Methods for the Deployments
API
Instance Method Summary
-
#create_deployment(repo, ref, options = {}) ⇒ Sawyer::Resource
Create a deployment for a ref.
-
#create_deployment_status(deployment_url, state, options = {}) ⇒ Sawyer::Resource
Create a deployment status for a Deployment.
-
#delete_deployment(repo, deployment_id, options = {}) ⇒ No Content
Delete a Deployment.
-
#deployment(repo, deployment_id, options = {}) ⇒ Sawyer::Resource
Fetch a single deployment for a repository.
-
#deployment_statuses(deployment_url, options = {}) ⇒ Array<Sawyer::Resource>
(also: #list_deployment_statuses)
List all statuses for a Deployment.
-
#deployments(repo, options = {}) ⇒ Array<Sawyer::Resource>
(also: #list_deployments)
List all deployments for a repository.
-
#list_deployment_statuses(deployment_url, options = {})
Alias for #deployment_statuses.
-
#list_deployments(repo, options = {})
Alias for #deployments.
Instance Method Details
#create_deployment(repo, ref, options = {}) ⇒ Sawyer::Resource
Create a deployment for a ref
# File 'lib/octokit/client/deployments.rb', line 41
def create_deployment(repo, ref, = {}) [:ref] = ref post("#{Repository.path repo}/deployments", ) end
#create_deployment_status(deployment_url, state, options = {}) ⇒ Sawyer::Resource
Create a deployment status for a Deployment
# File 'lib/octokit/client/deployments.rb', line 75
def create_deployment_status(deployment_url, state, = {}) deployment = get(deployment_url, accept: [:accept]) [:state] = state.to_s.downcase post(deployment.rels[:statuses].href, ) end
#delete_deployment(repo, deployment_id, options = {}) ⇒ No
Content
Delete a Deployment
# File 'lib/octokit/client/deployments.rb', line 52
def delete_deployment(repo, deployment_id, = {}) delete("#{Repository.path repo}/deployments/#{deployment_id}", ) end
#deployment(repo, deployment_id, options = {}) ⇒ Sawyer::Resource
Fetch a single deployment for a repository
# File 'lib/octokit/client/deployments.rb', line 15
def deployment(repo, deployment_id, = {}) get("#{Repository.path repo}/deployments/#{deployment_id}", ) end
#deployment_statuses(deployment_url, options = {}) ⇒ Array
<Sawyer::Resource
>
Also known as: #list_deployment_statuses
List all statuses for a Deployment
# File 'lib/octokit/client/deployments.rb', line 61
def deployment_statuses(deployment_url, = {}) deployment = get(deployment_url, accept: [:accept]) get(deployment.rels[:statuses].href, ) end
#deployments(repo, options = {}) ⇒ Array
<Sawyer::Resource
>
Also known as: #list_deployments
List all deployments for a repository
# File 'lib/octokit/client/deployments.rb', line 24
def deployments(repo, = {}) get("#{Repository.path repo}/deployments", ) end
#list_deployment_statuses(deployment_url, options = {})
Alias for #deployment_statuses.
# File 'lib/octokit/client/deployments.rb', line 65
alias list_deployment_statuses deployment_statuses
#list_deployments(repo, options = {})
Alias for #deployments.
# File 'lib/octokit/client/deployments.rb', line 27
alias list_deployments deployments