node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

Upgrade from npm github package to @octokit/rest #612

Closed protoEvangelion closed 4 years ago

protoEvangelion commented 5 years ago

This is going to be an intense upgrade @octokit/rest does not work with the callback pattern which we are using everywhere.

This will require us to un-nest callback hell into async/await because @octokit/rest returns a promise.

Also we will need to verify that the payload keys are all correct and the method names have not changed.

protoEvangelion commented 5 years ago

One of the unforseen issues that popped up is nock not handling gzipped rest responses but storing them as hex: https://github.com/nock/nock/issues/1212

This prevents us from normalizing the data.

One idea is to fix this in nock by ungzipping it then allowing nockback to provide the normalization function as usual. Then adding a new lifecycle method in nockBack to regzip once the normalization is complete.

protoEvangelion commented 4 years ago

:tada: This PR is included in version 2.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: