Skip to content

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

Closed
bicknellr wants to merge 6 commits intomasterfrom
octokit
Closed

Updates CLI to use '@octokit/rest' instead of 'github'.#154
bicknellr wants to merge 6 commits intomasterfrom
octokit

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 releases = response.data;
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.

@bicknellr bicknellr requested review from dfreedm and rictic April 17, 2018 01:29
@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

* 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