Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to list a single deployment, by id #996

Merged
merged 2 commits into from
Mar 31, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add endpoint to fetch a single Github deployment.
Update the deployment tests to not rely on static data

	modified:   .gitignore
	modified:   lib/octokit/client/deployments.rb
	deleted:    spec/cassettes/Octokit_Client_Deployments/_create_deployment/creates_a_deployment.json
	deleted:    spec/cassettes/Octokit_Client_Deployments/_create_deployment/creates_a_deployment_with_a_payload.json
	deleted:    spec/cassettes/Octokit_Client_Deployments/_create_deployment_status/creates_a_deployment_status.json
	deleted:    spec/cassettes/Octokit_Client_Deployments/_deployment_statuses/lists_deployment_statuses.json
	modified:   spec/cassettes/Octokit_Client_Deployments/_deployments/lists_deployments.json
	new file:   spec/cassettes/Octokit_Client_Deployments/with_ref/_create_deployment/creates_a_deployment.json
	new file:   spec/cassettes/Octokit_Client_Deployments/with_ref/_create_deployment/creates_a_deployment_with_a_payload.json
	new file:   spec/cassettes/Octokit_Client_Deployments/with_ref/with_deployment/_create_deployment_status/creates_a_deployment_status.json
	new file:   spec/cassettes/Octokit_Client_Deployments/with_ref/with_deployment/_deployment/gets_a_single_deployment.json
	new file:   spec/cassettes/Octokit_Client_Deployments/with_ref/with_deployment/_deployment_statuses/lists_deployment_statuses.json
	modified:   spec/octokit/client/deployments_spec.rb
  • Loading branch information
russellballestrini committed Mar 30, 2018
commit d28cb54e0b6cabdad7cf42fe9d653c5fef15b3c0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.bundle
.config
.yardoc
.ruby-version
Gemfile.lock
InstalledFiles
\#*
Expand Down
10 changes: 10 additions & 0 deletions lib/octokit/client/deployments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ class Client
# @see https://developer.github.com/v3/repos/commits/deployments/
module Deployments

# Fetch a single deployment for a repository
#
# @param repo [Integer, String, Repository, Hash] A GitHub repository
# @param deployment_id [Integer, String, Repository, Hash] A GitHub repository
# @return <Sawyer::Resource> A single deployment
# @see https://developer.github.com/v3/repos/deployments/#get-a-single-deployment
def deployment(repo, deployment_id, options = {})
get("#{Repository.path repo}/deployments/#{deployment_id}", options)
end

# List all deployments for a repository
#
# @param repo [Integer, String, Repository, Hash] A GitHub repository
Expand Down

This file was deleted.

Loading