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

feat: Use dub.customer.list to issue dual-sided incentives #18452

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

steven-tey
Copy link
Contributor

@steven-tey steven-tey commented Jan 3, 2025

What does this PR do?

This PR uses Dub's customer.list API to get the corresponding discount code for a referred user (if it exists).

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Test the Stripe checkout flow to make sure everything runs as expected.

Copy link

vercel bot commented Jan 3, 2025

@steven-tey is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot requested a review from a team January 3, 2025 06:30
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jan 3, 2025
@graphite-app graphite-app bot requested a review from a team January 3, 2025 06:30
Copy link
Contributor

github-actions bot commented Jan 3, 2025

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "[FEAT] Use dub.customer to issue dual-sided incentives". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@dosubot dosubot bot added the ✨ feature New feature or request label Jan 3, 2025
Copy link

graphite-app bot commented Jan 3, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (01/03/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add foundation team as reviewer" took an action on this PR • (01/03/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (01/03/25)

1 label was added to this PR based on Keith Williams's automation.

@steven-tey steven-tey marked this pull request as draft January 3, 2025 06:47
@steven-tey steven-tey changed the title [FEAT] Use dub.customer to issue dual-sided incentives feat: Use dub.customer to issue dual-sided incentives Jan 3, 2025
yarn.lock Outdated Show resolved Hide resolved
@steven-tey steven-tey marked this pull request as ready for review January 3, 2025 17:46
@steven-tey steven-tey changed the title feat: Use dub.customer to issue dual-sided incentives feat: Use dub.customer.list to issue dual-sided incentives Jan 3, 2025
Copy link
Contributor

github-actions bot commented Jan 3, 2025

E2E results are ready!

Copy link
Contributor

@Praashh Praashh left a comment

Choose a reason for hiding this comment

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

LGTM!, waiting for @zomars and @sean-brydon to review it 🙏 .

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@formkit/[email protected] None 0 35.4 kB justin-schroeder
npm/@types/[email protected] None 0 3.37 kB types
npm/@types/[email protected] None 0 868 kB types
npm/@types/[email protected] None 0 3.38 kB types
npm/@types/[email protected] None 0 1.63 MB types
npm/[email protected] None 0 23.6 kB jedwatson
npm/[email protected] None 0 669 kB kewisch

🚮 Removed packages: npm/@axiomhq/[email protected], npm/@calcom/[email protected], npm/@calcom/[email protected], npm/@golevelup/[email protected], npm/@microsoft/[email protected], npm/@nest-lab/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@sentry/[email protected], npm/@sentry/[email protected], npm/@sentry/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteCI
Critical CVE npm/dompurify@=2.3.3 ⚠︎
Possible typosquat attack npm/[email protected] ⚠︎

View full report↗︎

Next steps

What is a critical CVE?

Contains a Critical Common Vulnerability and Exposure (CVE).

Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

What is a typosquat?

Package name is similar to other popular packages and may not be the package you want.

Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/dompurify@=2.3.3
  • @SocketSecurity ignore npm/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Created by Linear-GitHub Sync ✨ feature New feature or request ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants