@cryptotaxi247 / CoPilot / commits / a9bd3d4a

Remove unnecessary validator for repo_url in ActiveResponseItem (#505)

taylor_socfortress committed Sep 10, 2025 at 15:05 UTC a9bd3d4a039ebea868507dd3034b16b3c42be76f
1 file changed -13
backend/app/integrations/copilot_action/schema/copilot_action.py
-13
@@ -63,19 +63,6 @@ class ActiveResponseItem(BaseModel):
63 return values["technology"].value.lower()
64 return v
65
66 - @validator("repo_url")
67 - def ensure_repo_url_ends_with_main(cls, v):
68 - # Keep it as string, just ensure it ends with /main/
69 - repo_str = str(v)
70 - if not repo_str.endswith("/main/") and not repo_str.endswith("/main"):
71 - if repo_str.endswith("/"):
72 - return f"{repo_str}main/"
73 - else:
74 - return f"{repo_str}/main/"
75 - elif repo_str.endswith("/main"):
76 - return f"{repo_str}/"
77 - return repo_str
78 -
66
67 class InventoryQueryRequest(BaseModel):
68 """Request model for inventory queries"""