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

JS -> TS #33

Merged
merged 13 commits into from
Aug 7, 2020
Merged

JS -> TS #33

merged 13 commits into from
Aug 7, 2020

Conversation

anarast
Copy link
Collaborator

@anarast anarast commented Aug 1, 2020

  • converts all files from javascript to typescript, adds typescript eslint
  • may have broken the prettier lint step

@@ -107,7 +114,7 @@ class AutoUpdater {
return true;
}

async prNeedsUpdate(pull) {
async prNeedsUpdate(pull: any): Promise<boolean> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought that this type should have been PullsListResponseItem like for update(), but using it gives the error Property 'merged' does not exist on type 'PullsListResponseItem'

Copy link
Owner

Choose a reason for hiding this comment

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

Maybe a type out of https://github.com/octokit/webhooks is what you're looking for? This isn't sent via an API request, GH actions calls autoupdate with an pull event

@codecov
Copy link

codecov bot commented Aug 1, 2020

Codecov Report

Merging #33 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
+ Coverage   98.62%   98.68%   +0.05%     
==========================================
  Files           3        3              
  Lines         364      379      +15     
  Branches       81       84       +3     
==========================================
+ Hits          359      374      +15     
  Misses          5        5              
Impacted Files Coverage Δ
src/autoupdater.ts 98.18% <100.00%> (ø)
src/config-loader.ts 100.00% <100.00%> (ø)
src/router.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 143dabf...3de4484. Read the comment docs.

Copy link
Owner

@chinthakagodawita chinthakagodawita left a comment

Choose a reason for hiding this comment

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

Looks great! Pretty excited to get this in. Some comments below

@@ -107,7 +114,7 @@ class AutoUpdater {
return true;
}

async prNeedsUpdate(pull) {
async prNeedsUpdate(pull: any): Promise<boolean> {
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe a type out of https://github.com/octokit/webhooks is what you're looking for? This isn't sent via an API request, GH actions calls autoupdate with an pull event

Copy link
Owner

@chinthakagodawita chinthakagodawita left a comment

Choose a reason for hiding this comment

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

One last thing and this is good to be merged!

@anarast
Copy link
Collaborator Author

anarast commented Aug 6, 2020

exec'd into the container and the index.js looked like it had all the stuff

Copy link
Owner

@chinthakagodawita chinthakagodawita left a comment

Choose a reason for hiding this comment

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

Nice, LGTM 👍

@chinthakagodawita chinthakagodawita merged commit 7d52e65 into master Aug 7, 2020
@chinthakagodawita chinthakagodawita deleted the typescript branch August 7, 2020 07:40
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.

2 participants