-
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 client methods to support Actions artifact APIs. #1480
Conversation
ac22174
to
c6b8980
Compare
72e9a46
to
9b8a8d1
Compare
9b8a8d1
to
52e099a
Compare
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 looks great to me from a code perspective ✨ I don't think there is anything you need to worry about from a documentation perspective as this all looks good to me. I'll make a note to revisit CONTRIBUTING.md
.
I'm not sure how to get VCR working - I've had similar issues. But @Brend-Smits managed to get round this with his recent PR, #1478, so I am wondering if he might be able to help?
VCR automatically recorded cassettes for me. It only does so once though. |
- Remove Webmock stubs (these were causing requests to be identified by VCR as externally stubbed, which causes them to be ignored during the record and replay phases) - Correct bugs revealed by making actual requests
I figured this out with a some help from @juanmrad 🙌🏿 (another recent contributor to this project). In my case, I had misunderstood the interaction between Webmock and VCR. Specifically, my tests originally used Webmock stubs like so:
When VCR encounters that request, it recognizes it as "externally stubbed" and ignores it. Once I removed those stubs, then VCR began attempting to record cassettes for new requests as expected. From there, I did indeed have to set the environment variables described in the docs on running and writing new tests that were relevant to my tests. Those were
With those changes in place I was able to record and replay cassettes as expected. One last note is that the VCR debug logging config was pretty helpful in making the above discoveries; I enabled that along the way too. |
@timrogers would you mind providing another review of this please? I think my pending workflows need to be approved again too. I also wonder if you can explain the remainder of the release process? Specifically I'm curious as to:
Thanks! |
Sure!
Of course:
|
# @param repo [Integer, String, Repository, Hash] A GitHub repository | ||
# | ||
# @return [Sawyer::Resource] the total count and an array of artifacts | ||
# @see https://developer.github.com/v3/actions/artifacts#list-artifacts-for-a-repository |
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.
# @see https://developer.github.com/v3/actions/artifacts#list-artifacts-for-a-repository | |
# @see https://docs.github.com/en/rest/actions/artifacts#list-artifacts-for-a-repository |
Released to RubyGems in v5.6.0. |
I'd very much welcome a contribution to the docs on this ✨ |
Partially addresses #1216.
This adds support for the Actions artifact APIs documented at https://docs.github.com/en/rest/actions/artifacts.
Help needed please 🙏🏿
:once
and running tests with eitherscript/test
orbundle exec rspec spec/octokit/client/actions_artifacts_spec.rb
, both to no avail. The lack of cassettes for these new tests will likely cause them to fail once the pending Actions workflows are authorized, so any guidance here would be much appreciated.bundle exec rake doc:yard
locally, but I'm not sure how to interpret its output. Please let me know if there's anything more to do here.