feat: simplify git mounts to use direct URLs instead of repo references

- Change git mount schema from repo_id to remote_url
- Remove database lookups for git mount resolution
- Clone directly from URL at instance startup
- Simplify frontend UI to text input for Git URL
- Fix route ordering in git_repositories.py to prevent 422 errors
- Update all tests to use remote_url field

Breaking change: Git mounts now use remote_url instead of repo_id
This commit is contained in:
Alex Blank
2026-05-27 11:53:25 +02:00
parent baabd1fa62
commit 89ca9f10c7
10 changed files with 176 additions and 321 deletions
@@ -333,7 +333,7 @@ class TestConfigProfilesAPI:
"files": {},
"git_mounts": [
{
"repo_id": repo_id,
"remote_url": "https://github.com/user/repo.git",
"source_path": ".",
"target_path": "/app",
"branch": "main",
@@ -369,7 +369,7 @@ class TestConfigProfilesAPI:
json={
"git_mounts": [
{
"repo_id": repo_id,
"remote_url": "https://github.com/user/repo.git",
"source_path": "config",
"target_path": "/config",
}
@@ -393,7 +393,7 @@ class TestConfigProfilesAPI:
"files": {},
"git_mounts": [
{
"repo_id": repo_id,
"remote_url": "https://github.com/user/repo.git",
"source_path": "/absolute/path",
"target_path": "/app",
}
@@ -414,7 +414,7 @@ class TestConfigProfilesAPI:
"files": {},
"git_mounts": [
{
"repo_id": repo_id,
"remote_url": "https://github.com/user/repo.git",
"source_path": ".",
"target_path": "relative/path",
}
@@ -436,7 +436,7 @@ class TestConfigProfilesAPI:
"files": {},
"git_mounts": [
{
"repo_id": repo_id,
"remote_url": "https://github.com/user/repo.git",
"source_path": ".",
"target_path": "/app",
}
@@ -450,4 +450,4 @@ class TestConfigProfilesAPI:
assert response.status_code == 200
data = response.json()
assert len(data["git_mounts"]) == 1
assert data["git_mounts"][0]["repo_id"] == repo_id
assert data["git_mounts"][0]["remote_url"] == "https://github.com/user/repo.git"