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

Introduce a type for GitHub issue comments #800

Merged
merged 2 commits into from
Dec 27, 2018

Conversation

cysp
Copy link
Member

@cysp cysp commented Dec 27, 2018

Here's some typing for GitHub issue comments, where there used to be a lot of any (which was why .include() wasn't picked up as an error).

@@ -96,7 +95,7 @@ export class GitHubAPI {
.map(comment => comment.id) // only return IDs
}

updateCommentWithID = async (id: number, comment: string): Promise<any> => {
updateCommentWithID = async (id: string, comment: string): Promise<any> => {
Copy link
Member Author

Choose a reason for hiding this comment

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

The existing Comment type has its ids as strings, and I think that these are only internal API, so I figured that this change was okay. Whaddayathink?

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense 👍

@DangerCI
Copy link

Danger run resulted in 1 warning; to find out more, see the checks page.

Generated by 🚫 dangerJS against 0eb5b4c

@orta orta merged commit ee2a752 into danger:master Dec 27, 2018
@orta
Copy link
Member

orta commented Dec 27, 2018

Yep, awesome

@peril-staging
Copy link
Contributor

peril-staging bot commented Dec 27, 2018

Thanks for the PR @cysp.

This PR has been shipped in v7.0.1 - CHANGELOG.

@cysp cysp deleted the feature/github-api-types branch December 27, 2018 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants