-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
@tarebyte could you help me figure out how to proceed? I'm hung on an error I'm not familiar with. |
@russellballestrini this you need to run the test locally in order to create a VCR cassette. It's basically a mock that tells the test what it should expect from the API request. |
Apologies I read this ^^ comment after I submitted my suggestion. |
@russellballestrini so the reason your test is having issues is because a lot of these tests are old and have been hard coded. I took some time this morning to update the tests so that is not longer the case. Hopefully this should get this PR back on track 😄 |
lib/octokit/client/deployments.rb
Outdated
def deployment(repo, deployment_id, options = {}) | ||
get("#{Repository.path repo}/deployments/#{deployment_id}", options) | ||
end | ||
alias :list_deployment :deployment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This alias doesn't really make sense, could we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could but I was following the pattern of the other methods. Does list mean "array" in this case or "look".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case list means "array"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I'll fix
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
@tarebyte please let me know what else needs to be done for this PR. |
Nothing, thanks @russellballestrini ! |
@tarebyte would you know off chance if the team is considering a new release of |
This has been released as part of https://github.com/octokit/octokit.rb/releases/tag/v4.9.0 |
Fixes #995
From the Github API I see that it is possible to fetch a single Github Deployment (https://developer.github.com/v3/repos/deployments/#get-a-single-deployment).
That said, at frst clance it doesn't appear that octokit supports this.
It seems like this file only needs the following (https://github.com/octokit/octokit.rb/blob/master/lib/octokit/client/deployments.rb):