Repository navigation
Add loyalty tiers #17
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,8 +26,6 @@ jobs: | |
| working-directory: apps/pr-reviewer | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v4 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The Suggested FixTo ensure the Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
| with: | ||
| node-version: 22 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| /** One and a half points per whole dollar spent, rounded once after the multiplier. */ | ||
| export function pointsFor(totalCents: number): number { | ||
| return Math.round((totalCents / 100) * 1.5); | ||
| export type LoyaltyTier = 'standard' | 'gold'; | ||
|
|
||
| const TIER_MULTIPLIER: Record<LoyaltyTier, number> = { standard: 1.5, gold: 2 }; | ||
|
|
||
| /** Points per whole dollar spent depend on the tier, rounded once after the multiplier. */ | ||
| export function pointsFor(totalCents: number, tier: LoyaltyTier = 'standard'): number { | ||
| return Math.round((totalCents / 100) * TIER_MULTIPLIER[tier]); | ||
| } |
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.
Shallow checkout breaks PR diff
High Severity
Removing
fetch-depth: 0makesactions/checkout@v4use its default depth of 1, so the clone has only the triggering commit. The latergit diff origin/${{ github.base_ref }}...HEADneeds that base ref and the merge-base, which a shallow checkout does not provide. The export step fails and the review agent never runs.Additional Locations (1)
.github/workflows/review.yml#L35-L36Reviewed by Cursor Bugbot for commit 329a953. Configure here.