Skip to content

Commit 3e96dfe

Browse files
authored
Merge pull request #5 from mja00/claude/implement-future-feature-01BotjCF3Ytzb8K6mcqQ5W8F
2 parents 5f92a5e + 7a61a96 commit 3e96dfe

20 files changed

Lines changed: 3460 additions & 60 deletions

.github/workflows/claude-code-review.yml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11
name: Claude Code Review
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize]
6-
# Optional: Only run on specific file changes
7-
# paths:
8-
# - "src/**/*.ts"
9-
# - "src/**/*.tsx"
10-
# - "src/**/*.js"
11-
# - "src/**/*.jsx"
4+
pull_request_review_comment:
5+
types: [created]
6+
pull_request_review:
7+
types: [submitted]
128

139
jobs:
1410
test:
11+
# Only run if comment contains "claude" and is on a PR (not an issue)
12+
# Exclude bot comments to prevent infinite loops
13+
if: |
14+
github.event.issue.pull_request != null &&
15+
github.event.comment.author.type != 'Bot' &&
16+
contains(github.event.comment.body, 'claude-review')
1517
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: read
1621
steps:
1722
- name: Checkout code
1823
uses: actions/checkout@v4
1924

25+
- name: Checkout PR branch
26+
run: |
27+
gh pr checkout ${{ github.event.issue.number }}
28+
env:
29+
GH_TOKEN: ${{ github.token }}
30+
2031
- name: Setup Node.js
2132
uses: actions/setup-node@v4
2233
with:
@@ -40,15 +51,16 @@ jobs:
4051

4152
claude-review:
4253
needs: test
43-
# Optional: Filter by PR author
44-
# if: |
45-
# github.event.pull_request.user.login == 'external-contributor' ||
46-
# github.event.pull_request.user.login == 'new-developer' ||
47-
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
54+
# Only run if comment contains "claude" and is on a PR (not an issue)
55+
# Exclude bot comments to prevent infinite loops
56+
if: |
57+
github.event.issue.pull_request != null &&
58+
github.event.comment.author.type != 'Bot' &&
59+
contains(github.event.comment.body, 'claude-review')
4860
4961
runs-on: ubuntu-latest
5062
permissions:
51-
contents: read
63+
contents: write
5264
pull-requests: read
5365
issues: read
5466
id-token: write
@@ -59,14 +71,20 @@ jobs:
5971
with:
6072
fetch-depth: 1
6173

74+
- name: Checkout PR branch
75+
run: |
76+
gh pr checkout ${{ github.event.issue.number }}
77+
env:
78+
GH_TOKEN: ${{ github.token }}
79+
6280
- name: Run Claude Code Review
6381
id: claude-review
6482
uses: anthropics/claude-code-action@v1
6583
with:
6684
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
6785
prompt: |
6886
REPO: ${{ github.repository }}
69-
PR NUMBER: ${{ github.event.pull_request.number }}
87+
PR NUMBER: ${{ github.event.issue.number }}
7088
7189
Please review this pull request and provide feedback on:
7290
- Code quality and best practices

CLAUDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,9 @@ Required environment variables (typically in `.env`):
176176
- OpenAI API key (for AI features)
177177
- fal.ai API key (for image generation)
178178
- Bot developer Discord user ID(s)
179+
180+
181+
## Reminders
182+
183+
- When wanting to create custom migration, use the following command to generate a migration file: `drizzle-kit generate --custom --name=<migration>`
184+
- Always ensure you're running linting, type checks, builds, and tests after completing features

FUTURE_PLANS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ interface GuildWeather {
234234

235235

236236

237-
#### 1.3 Time-Based Fishing (Day/Night Cycle) ⭐⭐⭐
237+
#### 1.3 Time-Based Fishing (Day/Night Cycle) ⭐⭐⭐
238238

239-
**Priority: MEDIUM** | **Complexity: Low** | **Impact: Medium**
239+
**Priority: MEDIUM** | **Complexity: Low** | **Impact: Medium** | **Status: IMPLEMENTED**
240240

241241

242242

@@ -2112,7 +2112,7 @@ Fish values fluctuate based on supply and demand.
21122112

21132113
14. ⚠️ **Prestige System** - Endgame content
21142114

2115-
15. ⚠️ **Time-Based Fishing** - Day/night cycle
2115+
15. **Time-Based Fishing** - Day/night cycle
21162116

21172117
16. ⚠️ **Boats/Vessels** - Cooldown/location unlocks
21182118

drizzle/0007_minor_diamondback.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CREATE TYPE "public"."time_of_day_enum" AS ENUM('DAY', 'NIGHT', 'DAWN', 'DUSK', 'ANY');--> statement-breakpoint
2+
ALTER TABLE "catchables" ADD COLUMN "time_of_day" time_of_day_enum DEFAULT 'ANY';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- Rollback migration for 0007_minor_diamondback
2+
-- This removes the time_of_day column and enum type
3+
-- WARNING: This will delete all time-based fishing configuration data
4+
5+
ALTER TABLE "catchables" DROP COLUMN "time_of_day";--> statement-breakpoint
6+
DROP TYPE "public"."time_of_day_enum";
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- Custom SQL migration file, put your code below! --
2+
3+
-- Data migration: Convert NULL time_of_day values to 'ANY' for consistency
4+
-- This handles legacy catchables that existed before the time-based fishing feature
5+
-- Ensures all catchables have explicit time_of_day values instead of NULL
6+
7+
UPDATE catchables SET time_of_day = 'ANY' WHERE time_of_day IS NULL;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "catchables" ALTER COLUMN "time_of_day" SET NOT NULL;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- Custom SQL migration file, put your code below! --
2+
3+
-- Add index on (rarity, time_of_day) for optimized fishing queries
4+
-- This improves performance of the pickCatchableByRarity query
5+
-- which filters by both rarity and time_of_day frequently
6+
CREATE INDEX IF NOT EXISTS idx_catchables_rarity_time ON catchables(rarity, time_of_day);

0 commit comments

Comments
 (0)