mirror of
https://github.com/hanzoai/insights.git
synced 2026-11-02 09:24:48 +00:00
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]>
26 lines
973 B
Python
26 lines
973 B
Python
"""Route registration for stamp. Auto-discovered by insights/api/__init__.py."""
|
|
|
|
from insights.api.routing import RouterRegistry
|
|
|
|
from .presentation.views import (
|
|
DigestChannelViewSet,
|
|
DigestRunViewSet,
|
|
PullRequestViewSet,
|
|
ReviewRunViewSet,
|
|
StampRepoConfigViewSet,
|
|
)
|
|
|
|
|
|
def register_routes(routers: RouterRegistry) -> None:
|
|
routers.projects.register(
|
|
r"stamp/repo_configs", StampRepoConfigViewSet, "project_stamp_repo_configs", ["team_id"]
|
|
)
|
|
routers.projects.register(
|
|
r"stamp/pull_requests", PullRequestViewSet, "project_stamp_pull_requests", ["team_id"]
|
|
)
|
|
routers.projects.register(r"stamp/review_runs", ReviewRunViewSet, "project_stamp_review_runs", ["team_id"])
|
|
routers.projects.register(
|
|
r"stamp/digest_channels", DigestChannelViewSet, "project_stamp_digest_channels", ["team_id"]
|
|
)
|
|
routers.projects.register(r"stamp/digest_runs", DigestRunViewSet, "project_stamp_digest_runs", ["team_id"])
|