-
Notifications
You must be signed in to change notification settings - Fork 147
Gifted Stickers for incomplete users #437
Gifted Stickers for incomplete users #437
Conversation
This should be more specific. Ordered by earliest
|
Of note: it's odd that we did not have to stub the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Few things to be renamed and some minor fixes. Probably will need one or two more rounds.
user_with_early_receipt_2prs | ||
.update(receipt: UserReceiptHelper.receipt[:early_receipt_2_prs]) | ||
user_with_early_receipt_3prs | ||
.update(receipt: UserReceiptHelper.receipt[:early_receipt_3_prs]) | ||
user_with_late_receipt_2prs | ||
.update(receipt: UserReceiptHelper.receipt[:late_receipt_2_prs]) | ||
user_with_late_receipt_3prs | ||
.update(receipt: UserReceiptHelper.receipt[:late_receipt_3_prs]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This starter data should be updated to reflect the logic that a user with the earliest date on their latest PR should be ranked first for users with that number of PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually already the case. My main mistake was just grabbing the first created PR per user as opposed to the last in the GiftService
. However, the user with the earliest date on their latest PR will always be ranked first. So if there is only one coupon user_with_early_receipt_3prs
(meaning user with score of 3, who's last PR has earliest PR created_at time) will be the one getting the coupon.
Co-Authored-By: John Britton <public@johndbritton.com>
Co-Authored-By: John Britton <public@johndbritton.com>
Co-Authored-By: John Britton <public@johndbritton.com>
Co-Authored-By: John Britton <public@johndbritton.com>
Co-Authored-By: John Britton <public@johndbritton.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple questions
Co-Authored-By: John Britton <public@johndbritton.com>
Distributing remaining sticker coupons
A new state will be added to the user state machine (
gifted_sticker
), to distribute all remaining sticker coupons. This will include:incomplete
->gifted_sticker
Test process
gifted_sticker
stateincomplete
state togifted_sticker
GiftStickersService
that will assign user a sticker couponOpen Source contributing guidelines