Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 33 additions & 15 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"
pull_request_review_comment:
types: [created]
pull_request_review:
types: [submitted]

jobs:
test:
# Only run if comment contains "claude" and is on a PR (not an issue)
# Exclude bot comments to prevent infinite loops
if: |
github.event.issue.pull_request != null &&
github.event.comment.author.type != 'Bot' &&
contains(github.event.comment.body, 'claude-review')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Checkout PR branch
run: |
gh pr checkout ${{ github.event.issue.number }}
env:
GH_TOKEN: ${{ github.token }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -40,15 +51,16 @@ jobs:

claude-review:
needs: test
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
# Only run if comment contains "claude" and is on a PR (not an issue)
# Exclude bot comments to prevent infinite loops
if: |
github.event.issue.pull_request != null &&
github.event.comment.author.type != 'Bot' &&
contains(github.event.comment.body, 'claude-review')

runs-on: ubuntu-latest
permissions:
contents: read
contents: write
pull-requests: read
issues: read
id-token: write
Expand All @@ -59,14 +71,20 @@ jobs:
with:
fetch-depth: 1

- name: Checkout PR branch
run: |
gh pr checkout ${{ github.event.issue.number }}
env:
GH_TOKEN: ${{ github.token }}

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
PR NUMBER: ${{ github.event.issue.number }}

Please review this pull request and provide feedback on:
- Code quality and best practices
Expand Down
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,9 @@ Required environment variables (typically in `.env`):
- OpenAI API key (for AI features)
- fal.ai API key (for image generation)
- Bot developer Discord user ID(s)


## Reminders

- When wanting to create custom migration, use the following command to generate a migration file: `drizzle-kit generate --custom --name=<migration>`
- Always ensure you're running linting, type checks, builds, and tests after completing features
6 changes: 3 additions & 3 deletions FUTURE_PLANS.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ interface GuildWeather {



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

**Priority: MEDIUM** | **Complexity: Low** | **Impact: Medium**
**Priority: MEDIUM** | **Complexity: Low** | **Impact: Medium** | **Status: IMPLEMENTED**



Expand Down Expand Up @@ -2112,7 +2112,7 @@ Fish values fluctuate based on supply and demand.

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

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

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

Expand Down
2 changes: 2 additions & 0 deletions drizzle/0007_minor_diamondback.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CREATE TYPE "public"."time_of_day_enum" AS ENUM('DAY', 'NIGHT', 'DAWN', 'DUSK', 'ANY');--> statement-breakpoint
ALTER TABLE "catchables" ADD COLUMN "time_of_day" time_of_day_enum DEFAULT 'ANY';
6 changes: 6 additions & 0 deletions drizzle/0007_minor_diamondback_rollback.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Rollback migration for 0007_minor_diamondback
-- This removes the time_of_day column and enum type
-- WARNING: This will delete all time-based fishing configuration data

ALTER TABLE "catchables" DROP COLUMN "time_of_day";--> statement-breakpoint
DROP TYPE "public"."time_of_day_enum";
7 changes: 7 additions & 0 deletions drizzle/0008_update-null-time-of-day.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Custom SQL migration file, put your code below! --

-- Data migration: Convert NULL time_of_day values to 'ANY' for consistency
-- This handles legacy catchables that existed before the time-based fishing feature
-- Ensures all catchables have explicit time_of_day values instead of NULL

UPDATE catchables SET time_of_day = 'ANY' WHERE time_of_day IS NULL;
1 change: 1 addition & 0 deletions drizzle/0009_fantastic_punisher.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "catchables" ALTER COLUMN "time_of_day" SET NOT NULL;
6 changes: 6 additions & 0 deletions drizzle/0010_add-catchables-index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Custom SQL migration file, put your code below! --

-- Add index on (rarity, time_of_day) for optimized fishing queries
-- This improves performance of the pickCatchableByRarity query
-- which filters by both rarity and time_of_day frequently
CREATE INDEX IF NOT EXISTS idx_catchables_rarity_time ON catchables(rarity, time_of_day);
Loading