Migrate to the new pokebedrock.com #61
No reviewers
Labels
No labels
blocked
bug
dependencies
documentation
duplicate
enhancement
github_actions
go
good first issue
help wanted
in-progress
invalid
question
ready-to-fix
source:discord
source:sentry
source:server-logs
triage-needed
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pokebedrock/pokebedrock-hub!61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "migrate-to-new-website"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary by CodeRabbit
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
5180cd2a-bc74-4631-a3d9-640ab04207f4📥 Commits
Reviewing files that changed from the base of the PR and between
d562cb180dandc64b660539.📒 Files selected for processing (4)
pokebedrock/command/kick.gopokebedrock/config.gopokebedrock/form/moderate.gopokebedrock/moderation/service.go🚧 Files skipped from review as they are similar to previous changes (4)
📝 Walkthrough
Walkthrough
The pull request refactors moderation integration around the players-service API. It introduces updated infliction and player-context models, changes retrieval and mutation endpoints and signatures, updates player upserts, changes default service URLs, and adjusts kick and moderation-form call sites.
Changes
Moderation service integration
pokebedrock/moderation/model.go,pokebedrock/moderation/service.goUserContextidentifies players, timestamps are converted between internal and API formats, and moderation operations use players-service REST endpoints with query parameters and centralized authentication.pokebedrock/moderation/service.go/api/playersusing the new upsert payload and authentication handling.pokebedrock/command/kick.go,pokebedrock/form/moderate.gopokebedrock/config.goEstimated code review effort: 3 (Moderate) | ~20 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
✨ Finishing Touches
📝 Generate docstrings
🧪 Generate unit tests (beta)
migrate-to-new-websiteThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.Actionable comments posted: 3
🧹 Nitpick comments (1)
🤖 Prompt for all review comments with AI agents
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
755725b0-af0c-42ea-bbef-d40554a1f08d📥 Commits
Reviewing files that changed from the base of the PR and between
e71c63774candd562cb180d.📒 Files selected for processing (5)
pokebedrock/command/kick.gopokebedrock/config.gopokebedrock/form/moderate.gopokebedrock/moderation/model.gopokebedrock/moderation/service.go⚠️ Potential issue | 🔴 Critical
Changing the defaults is not enough for existing installs.
ReadConfig()only writesDefaultConfig()whenconfig.tomlis missing. Upgraded servers keep their oldService.ModerationURL, but the new moderation client now appends/api/...itself, so those nodes will keep calling malformed endpoints until the stored value is migrated or normalized.🤖 Prompt for AI Agents
@ -180,0 +195,4 @@UserContext: userCtx,Infliction: internalToAPICreate(infliction),}rawRequest, err := json.Marshal(apiReq)⚠️ Potential issue | 🟠 Major
Avoid logging the full
UserContext.UserContextnow carries XUID, DiscordID, and IP fields.%+vwill dump whichever of those are present into debug logs, which creates a new PII retention path for moderation writes. Log a bounded identifier instead.🤖 Prompt for AI Agents
✅ Addressed in commits
cdafaa6toc64b660@ -262,2 +298,4 @@// closeBody drains and closes an HTTP response body so the connection can be// reused by the keep-alive pool.func closeBody(resp *http.Response) {⚠️ Potential issue | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-hub
Length of output: 199
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-hub
Length of output: 1192
This host extraction breaks IPv6 clients.
Splitting
p.Addr().String()on:truncates host:port strings like[2001:db8::1]:19132to[2001, writing invalid IPs into the player upsert flow and breaking cross-service player matching for IPv6 users. Thenetpackage is already imported; usenet.SplitHostPort()instead.Suggested fix
🤖 Prompt for AI Agents
✅ Addressed in commits
cdafaa6toc64b660c64b660539to25aa8be7ed