-
Notifications
You must be signed in to change notification settings - Fork 199
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
Conversation
packages/cli/src/github/github.ts
Outdated
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); |
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.
Unfortunately, it seems like their index.d.ts
no longer has types for responses.
What's the advantage of |
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. |
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. |
@@ -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> { |
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.
Switching from types to any
is a pretty big regression. I'd rather not update the library if that's the primary change.
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.
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
?
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.
If there's an expectation that the newer version of the library is better then I'm on board
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.
I think this is blocked on https://github.com/octokit/rest.js/pull/732
No description provided.