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
Integrate go-gh API package #5614
Conversation
523a40d
to
4073d37
Compare
5ab69cd
to
4cf7b35
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.
Thanks for the gargantuan body of work!
Could there be a way to continue generating a "cached" API client from the go-gh client? That way we wouldn't have to restructure so much code to allow for explicitly passing a cached client around 🤔
@mislav I addressed the PR feedback. The tests are going to continue to fail until cli/go-gh#49 gets merged in as that PR has some of the changes you requested. The only thing that has not been addressed is the caching client issue. I am open to ideas here as to how to generate a cache client from a normal client, but right now I am running into an order of operations issue. We determine the cache key from the request headers which do not get set right away, they get set somewhere in the transport chain, so adding a caching layer to the top of the transport chain will result in a cache key that is derived from blank headers and won't be unique in some situations, for example if a user refreshes their auth token. |
@mislav This is now ready for re-review. After the changes to |
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.
Fantastic! Thank you for the hard work
e896e8c
to
3f7f89d
Compare
3f7f89d
to
f50a0ae
Compare
This PR replaces our API package implementation with implementation backed by
go-gh
API package. This has resulted in changes across numerous files, because of this I have noted design choices and questions inline with the code.cc #5560