Files
zeekayandHanzo Dev b497511c04 no hogs: stamphog and review_hog are stamp and review
Both are Django apps, and both pin `label` in apps.py — "stamp" and "review".
django_migrations keys a row on (app_label, name), and app_label comes from that
pin and not from the import path, so moving the directory does not orphan a
single migration. All six stay where they are, untouched.

  products/stamphog -> products/stamp     name = products.stamp.backend
  products/review_hog -> products/review  name = products.review.backend
  StamphogScene/ -> StampScene/, and stamphogSceneLogic.ts with it

189 files follow. An earlier attempt at this move failed twice for reasons worth
recording: `git mv A B` where B exists puts A INSIDE B, and a stray
products/stamp/node_modules from an abandoned run was enough to make B exist —
the app ended up nested two deep. And `git ls-files` does not list a file moved
with plain mv and not yet staged, so a pass over "every tracked file" silently
skips it; that is how StampScene.tsx kept importing ./stampSceneLogic after the
file beside it had been renamed back.

bin/check-imports-are-committed: all first-party imports across 15,843 files
resolve.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-09 10:18:18 -07:00

53 lines
1.9 KiB
Python

from insights.api.routing import RouterRegistry
from products.review.backend.api import (
ReviewBlindSpotsConfigViewSet,
ReviewTriggerViewSet,
ReviewPerspectiveConfigViewSet,
ReviewRecentReviewsViewSet,
ReviewUserSettingsViewSet,
ReviewValidatorConfigViewSet,
)
def register_routes(routers: RouterRegistry) -> None:
# Unscoped: the trigger resolves team + run user server-side and is gated by a shared secret, so it
# mounts at /v1/review/trigger (no team in the URL) rather than under the project router.
routers.root.register(r"review", ReviewTriggerViewSet, "review")
# Team-scoped: per-user perspective enablement for the project's reviews (the config UI).
routers.projects.register(
r"review/perspectives",
ReviewPerspectiveConfigViewSet,
"project_review_perspectives",
["team_id"],
)
# Team-scoped: per-user selection of the single active review validator (the config UI).
routers.projects.register(
r"review/validators",
ReviewValidatorConfigViewSet,
"project_review_validators",
["team_id"],
)
# Team-scoped: per-user selection of the single active blind-spots skill (the config UI).
routers.projects.register(
r"review/blind_spots",
ReviewBlindSpotsConfigViewSet,
"project_review_blind_spots",
["team_id"],
)
# Team-scoped: the requesting user's recent reviews (read-only meta for the config UI).
routers.projects.register(
r"review/reviews",
ReviewRecentReviewsViewSet,
"project_review_reviews",
["team_id"],
)
# Team-scoped: per-user trigger opt-outs + urgency threshold, at review/settings (the viewset
# has no list/detail routes — only the GET+PATCH "settings" action).
routers.projects.register(
r"review",
ReviewUserSettingsViewSet,
"project_review_settings",
["team_id"],
)