houndci / hound

Automated code review for GitHub pull requests.
https://houndci.com
MIT License
1.95k stars 402 forks source link

Look for existing paying Stripe user first #1854

Closed gylaz closed 3 years ago

gylaz commented 3 years ago

This fixes the logic where a user that activates a repo already has a Stripe account, but it's not set-up for being charged (older users). We now will try to find an existing paying user within the same org, before checking if the current user has a Stripe account.

gylaz commented 3 years ago

Any test changes?

Good call. I've enhanced the test, so that both users have Stripe accounts (but only one has a valid Stripe subscription).