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

ci: Add Reusable PR Workflow #13

Merged
merged 9 commits into from
Jul 17, 2024

Conversation

alexs-mparticle
Copy link
Collaborator

@alexs-mparticle alexs-mparticle commented Jul 12, 2024

Summary

  • Replaces current PR Workflow with a reusable Pull Request that will be shared across all web kits
  • Adds npm run lint command to package.json so we can also run the linter

Testing Plan

  • The linked workflow is generating lint errors intentionally to verify that the reusable workflow is running correctly and throwing an error if the linter finds an issue.
  • Once the workflow PR is approved, I will update this PR to correct the linting errors.
  • When the linting errors are fixed, this PR should pass all checks and can be considered tested.

Master Issue

Closes https://go.mparticle.com/work/SQDSDKS-6560

@alexs-mparticle alexs-mparticle changed the base branch from main to development July 12, 2024 16:36
Copy link
Collaborator

@SbDove SbDove left a comment

Choose a reason for hiding this comment

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

Looks good!

// EventName: "Error"
// }
};
EventHandler.prototype.logPageView = function(event) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

i believe this will cause an error in the wrapper. https://github.com/mparticle-integrations/mparticle-javascript-web-kit-wrapper/blob/master/index.js#L160-L190

This doesn't check for the existence before calling.

So @SbDove - there are no page views in heap?

Copy link
Collaborator

Choose a reason for hiding this comment

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

So i'd put it back

@alexs-mparticle alexs-mparticle force-pushed the ci/SQDSDKS-6560-add-pr-workflow branch from b05d76c to c2691a4 Compare July 16, 2024 14:49
// EventName: "Error"
// }
};
EventHandler.prototype.logPageView = function(event) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

So i'd put it back

@alexs-mparticle alexs-mparticle requested a review from rmi22186 July 16, 2024 15:05
Copy link
Collaborator

@SbDove SbDove left a comment

Choose a reason for hiding this comment

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

Looks good!

appName,
customFlags,
clientId
common
Copy link
Collaborator

Choose a reason for hiding this comment

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

i know aI'd either leave the remaining arguments here along with an eslint disable before it for unused arguments, or a comment saying what other arguments are available. The likeliest one that may be used in the future is customFlags. If someone in the future came back to look at this, it may be hard for them to know where that should come from without a comment or the argument here.

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 think a comment works best as I don't want someone to forget to turn off the eslint disable setting in the future. Some of this feedback indicates that we should take a look at the example repo and consider adding something like JSDocs to declare what parameters are available for derived kits instead of adding unnecessary variables that could cause some code bloat.

@alexs-mparticle alexs-mparticle requested a review from rmi22186 July 17, 2024 13:22
@alexs-mparticle alexs-mparticle merged commit 2fc8e9f into development Jul 17, 2024
4 checks passed
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