Skip to content
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

Updates CLI to use '@octokit/rest' instead of 'github'. #154

Closed
wants to merge 6 commits into from

Conversation

bicknellr
Copy link
Member

No description provided.

@bicknellr bicknellr changed the title Updates CLI to use @octokit/rest instead of 'github Updates CLI to use '@octokit/rest' instead of 'github'. Apr 17, 2018
const validReleaseVersions =
releases.filter((r) => semver.valid(r.tag_name)).map((r) => r.tag_name);
releases.filter((r: any) => semver.valid(r.tag_name)).map((r: any) => r.tag_name);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, it seems like their index.d.ts no longer has types for responses.

@rictic
Copy link
Contributor

rictic commented Apr 17, 2018

What's the advantage of octokit over github?

@TimvdLippe
Copy link
Contributor

There is no advantage other than that the old package name is no longer updated. They simply renamed their package and continued development under the new name.

@bicknellr
Copy link
Member Author

I was trying to figure out how to retrieve a branch instead of a release and noticed they had updated and couldn't find documentation for the version we were using.

@TimvdLippe
Copy link
Contributor

@@ -156,21 +154,29 @@ export class Github {
* Get all Github releases and match their tag names against the given semver
* range. Return the release with the latest possible match.
*/
async getSemverRelease(semverRange: string): Promise<GitHubApi.Release> {
async getSemverRelease(semverRange: string): Promise<any> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching from types to any is a pretty big regression. I'd rather not update the library if that's the primary change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would you say to manually adding types here, casting the AnyResponse to a custom type where data is something that we've defined as not any?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's an expectation that the newer version of the library is better then I'm on board

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants