Standalone Perforce changelist review bot for the Ceramica project.
It polls submitted Perforce changelists, loads deterministic rules from TechDoc.rules.yaml, evaluates them, writes results to review-last.json, and posts Discord notifications.
- Polls
p4 changes -s submitted - Reads changelist descriptions, files, and text diffs
- Loads rules dynamically from
rules/TechDoc.rules.yaml - Checks submission, naming, and organization rules
- Posts one Discord message per changelist
- Mentions the changelist author above their own review embed
- Uses colored ANSI text for warning/error/blocker findings
- Windows PowerShell 5.1+
- Perforce
p4.exeonPATH - Node.js
js-yamlavailable onNODE_PATHor at the path configured inreview.config.json
- Copy
review.config.example.jsontoreview.config.json. - Copy
config/TeamMembers.example.txttoconfig/TeamMembers.txt. - Fill in your Perforce depot, workspace, user, client, and local tool paths.
- Set the Discord webhook URL as an environment variable:
$env:DISCORD_WEBHOOK_URL = "https://discord.com/api/webhooks/..."One-shot review:
.\P4Poller.ps1 -OnceContinuous polling:
.\P4Poller.ps1 -LoopSeconds 60Send results to Discord:
.\P4Poller.ps1 -Once -PostToDiscordThe runtime config is review.config.json, which is intentionally ignored by Git.
The committed example is:
review.config.example.json
The team roster is:
config/TeamMembers.txt
This file is also ignored by Git. A sanitized example is committed as:
config/TeamMembers.example.txt
- No
warning,error, orblocker: green✅ successembed with a short summary warning: yellow embed with yellow warning texterror: red embed with red error textblocker: red embed with bold red error textinfo: written toreview-last.jsonbut not sent to Discord
Each changelist is posted as its own message. The author mention appears above the embed so the author can quickly find their own entry.
Rules are defined in:
rules/TechDoc.rules.yaml
Additional project guidance is in:
docs/CeramicaReviewGuidelines.md
Each run writes:
review-last.json
State is stored in:
review.state.json
Delete review.state.json to re-scan all changelists.