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

Remove userName and userImage from Reviews #40

Merged
merged 5 commits into from
Sep 20, 2023

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Sep 19, 2023

Description

This PR addresses the issue #18 by removing the userName, userImage, and reviewId fields from the response of the /apps/:appId/reviews endpoint by default. It also provides an option to include the user data by setting the userdata query parameter to true. Additionally, occurrences of the userName in the replyText are replaced with <<USER>> to anonymize the data.

Summary of Changes

  • Modified the /apps/:appId/reviews endpoint in lib/index.js to remove the userName, userImage, and reviewId fields from the response.
  • Added a conditional check to include the userName and userImage fields in the response if the userdata query parameter is set to true.
  • Created a helper function anonymizeReplyText to replace occurrences of the userName in the replyText with <<USER>>.
  • Used the anonymizeReplyText function to anonymize the replyText of each review.

Please review and merge this PR. Thank you!

Fixes #18.


🎉 Latest improvements to Sweep:


💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Sep 19, 2023
@github-actions github-actions bot temporarily deployed to FlyDev September 20, 2023 01:05 Destroyed
@github-actions github-actions bot temporarily deployed to FlyDev September 20, 2023 04:01 Destroyed
@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 20, 2023

GitHub actions yielded the following error.

The command that failed is npm install. Here are the relevant lines from the logs:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: newman-reporter-htmlextra@1.22.11
npm ERR! Found: newman@6.0.0
npm ERR! node_modules/newman
npm ERR!   dev newman@"^6.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer newman@"^5.1.2" from newman-reporter-htmlextra@1.22.11
npm ERR! node_modules/newman-reporter-htmlextra
npm ERR!   dev newman-reporter-htmlextra@"^1.22.11" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: newman@5.3.2
npm ERR! node_modules/newman
npm ERR!   peer newman@"^5.1.2" from newman-reporter-htmlextra@1.22.11
npm ERR!   node_modules/newman-reporter-htmlextra
npm ERR!     dev newman-reporter-htmlextra@"^1.22.11" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /home/runner/.npm/_logs/2023-09-20T04_11_21_693Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2023-09-20T04_11_21_693Z-debug-0.log
##[error]Process completed with exit code 1.

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@srikanthlogic srikanthlogic merged commit 0135a2b into main Sep 20, 2023
1 check passed
@srikanthlogic srikanthlogic deleted the sweep/remove-user-data branch September 20, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove userName and userImage from Reviews
1 participant