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

Typescript migration #113

Merged
merged 9 commits into from
Aug 19, 2020
Merged

Typescript migration #113

merged 9 commits into from
Aug 19, 2020

Conversation

wolfy1339
Copy link
Contributor

Fixes #74

@stale
Copy link

stale bot commented Jul 1, 2019

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the wontfix label Jul 1, 2019
@wolfy1339
Copy link
Contributor Author

wolfy1339 commented Jul 2, 2019 via email

@stale stale bot removed the wontfix label Jul 2, 2019
@stale
Copy link

stale bot commented Sep 30, 2019

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the wontfix label Sep 30, 2019
@wolfy1339
Copy link
Contributor Author

Not stale

@stale stale bot removed the wontfix label Sep 30, 2019
@wolfy1339
Copy link
Contributor Author

Ping @JasonEtco

@stale
Copy link

stale bot commented Dec 29, 2019

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the wontfix label Dec 29, 2019
@wolfy1339
Copy link
Contributor Author

Not stale

@stale stale bot removed the wontfix label Dec 29, 2019
@stale
Copy link

stale bot commented Mar 28, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the wontfix label Mar 28, 2020
@wolfy1339
Copy link
Contributor Author

wolfy1339 commented Mar 28, 2020 via email

@stale stale bot removed the wontfix label Mar 28, 2020
@wolfy1339
Copy link
Contributor Author

Ping @JasonEtco @tcbyrd

@stale
Copy link

stale bot commented Jun 26, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the wontfix label Jun 26, 2020
@wolfy1339
Copy link
Contributor Author

wolfy1339 commented Jun 26, 2020 via email

@stale stale bot removed the wontfix label Jun 26, 2020
Change Imports
Define class properties
Fix all remaining errors
Since `async`/`await` was introduced in ES2017, why not take advantage of static class members
index.ts Outdated
constructor ({ source, target, logger = console }) {
source: string;
target: string;
logger: Console;
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, indeed. they should be updated to those ones

@@ -24,7 +35,7 @@ class Client {

delete data.query

const req = superagent.post(target).send(data.body)
const req = superagent.post(url.format(target)).send(data.body)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you recall why you did this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't remember exactly.
But removing it causes errors

Argument of type 'UrlWithParsedQuery' is not assignable to parameter of type 'string'.

@@ -36,7 +47,7 @@ class Client {
if (err) {
this.logger.error(err)
} else {
this.logger.info(`${req.method} ${req.url} - ${res.statusCode}`)
this.logger.info(`${req.method} ${req.url} - ${res.status}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you recall why you did this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same comment as above.

Property 'statusCode' does not exist on type 'Response'.

@gr2m
Copy link
Contributor

gr2m commented Aug 13, 2020

As we don't have good test coverage yet (see #155), did you try it locally if this actually works? 😁

Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

I tested it locally and it all looks good to me. Thanks for your patience with us @wolfy1339 💐

@gr2m gr2m merged commit 44c6213 into probot:master Aug 19, 2020
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.

Types for smee-client
2 participants