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

Replace async for-of loops with promises / clean up CI #8

Merged
merged 9 commits into from
Mar 16, 2020

Conversation

gomorizsolt
Copy link
Collaborator

@gomorizsolt gomorizsolt commented Feb 19, 2020

Issue #5.

Changes:

  • replace the async-await structure with promises
  • replace for-of loops
  • clean up CI logs

index.js Outdated Show resolved Hide resolved
@thisismydesign
Copy link
Member

[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead

Since it's not a direct dependency of the project I don't think there's anything to do with it(it's a sub-dependency of @actions/github). Does the error have something to do with actions/toolkit#334?

Update: AFAICU actions/toolkit#332 fixes the warning.

We can address this in #4

Copy link
Member

@thisismydesign thisismydesign left a comment

Choose a reason for hiding this comment

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

make sure execution finishes (i.e. wait for promises to resolve), be mindful of properly returning promises and waiting for them

I don't think this was addressed. What guarantees that the async calls in the loop execute? AFAICT you'll need to collect promises and use Promise.all to wait for all of them to complete.

Also, return has no effect within forEach. Returning something from run doesn't make sense either imo, afaict nothing is using that.

index.js Outdated Show resolved Hide resolved
Copy link
Member

@thisismydesign thisismydesign left a comment

Choose a reason for hiding this comment

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

Overall looks a lot cleaner than my original version and this is what I had in mind 👍 Leaving a few comments

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
Copy link
Member

@thisismydesign thisismydesign left a comment

Choose a reason for hiding this comment

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

Marking a few things i didn't get. Let's discuss these on the phone.

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
Copy link
Member

@thisismydesign thisismydesign left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@gomorizsolt gomorizsolt merged commit ff0833c into master Mar 16, 2020
@gomorizsolt gomorizsolt deleted the issue-5-project-clean-up branch March 16, 2020 09:01
This pull request was closed.
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