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

Sweep: add webhook when uploading cookie #69 #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented May 18, 2024

Description

This pull request introduces the functionality to send a webhook notification when a cookie is successfully uploaded. This feature allows for external systems to be notified and react to the event of a cookie upload, enhancing the extension's integration capabilities.

Summary

  • Added support for configuring a webhook_url in the extension settings.
  • Implemented a POST request to the configured webhook_url with the cookie and local storage data as the payload when a cookie upload is marked as done.
  • Updated the popup settings UI to include a field for entering the webhook_url.
  • Ensured error handling and logging for the webhook request to aid in debugging and monitoring.
  • Modified files: extension/function.js for the webhook implementation and extension/popup.tsx for UI changes.

Fixes #69.


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

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

This is an automated message generated by Sweep AI.

Copy link
Author

sweep-ai bot commented May 18, 2024

Rollback Files For Sweep

  • Rollback changes to extension/popup.tsx
  • Rollback changes to extension/function.js

This is an automated message generated by Sweep AI.

Copy link
Author

sweep-ai bot commented May 18, 2024

Sweep: PR Review

extension/function.js

The changes add a new feature to send a POST request to a webhook URL with cookie and local storage data if the upload is successful and the webhook URL is provided.

Sweep Found These Issues


extension/popup.tsx

Added a new "webhook_url" field to the state and form, and integrated it into the existing state management and form handling logic.

Sweep Found These Issues

  • The webhook_url field is not included in the validation checks within the test and save functions, which could lead to incomplete or incorrect data being processed.
  • if( !data['endpoint'] || !data['password'] || !data['uuid'] || !data['type'] )
    {
    alert(browser.i18n.getMessage("fullMessagePlease"));
    return;

    View Diff


@sweep-ai sweep-ai bot added the sweep Sweep your software chores label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Sweep your software chores
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: add webhook when uploading cookie #69
1 participant