-
Notifications
You must be signed in to change notification settings - Fork 57
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
[BUG]: Upgrading from @actions/github
V5 -> V6 caused TypeErrors within getOcktokit()
#683
Comments
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with |
I'm not entirely sure this is a problem with Octokit, can you open an issue with |
|
@ZauberNerd Can you help us out here since you implemented the Proxy |
The implementation of octokit#622 only implemented a `get` Proxy trap. This worked fine for the simple use-case of invoking the methods, but failed when users tried to mock functions with Jest or Sinon. It also did not list all functions anymore, when pressing tab-tab in a REPL. This commit implements further Proxy traps which are required for those use-cases and it uses the cache object for mutating operations. Fixes: octokit#683
I've submitted a PR to address this issue: #684 |
The implementation of #622 only implemented a `get` Proxy trap. This worked fine for the simple use-case of invoking the methods, but failed when users tried to mock functions with Jest or Sinon. It also did not list all functions anymore, when pressing tab-tab in a REPL. This commit implements further Proxy traps which are required for those use-cases and it uses the cache object for mutating operations. Fixes: #683
🎉 This issue has been resolved in version 10.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What happened?
Version 5 of
@actions/github
, I was able to do this within my tests:As of version 6, I've had to do something like:
I noticed this was a change in way the endpoints are generated and is now done via a proxy as of #622, could this of introduced unwanted side effects or is this the intended behaviour?
Versions
@actions/github: v6
NodeJS: 18
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: