Skip to content

Commit 4663d11

Browse files
committed
scripts(refactor[typing]): Use raw dict for remotes in gitlab generator
why: RawConfig type expects serializable primitives, not GitRemote objects. what: - Replace GitRemote instantiation with plain dict containing fetch_url/push_url - Remove unused GitRemote import
1 parent ee82d4e commit 4663d11

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

scripts/generate_gitlab.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
import requests
1414
import yaml
15-
from libvcs.sync.git import GitRemote
16-
1715
from vcspull.cli.sync import CouldNotGuessVCSFromURL, guess_vcs
1816

1917
if t.TYPE_CHECKING:
@@ -108,11 +106,10 @@
108106
"path": path / reponame,
109107
"url": f"git+ssh://{url_to_repo}",
110108
"remotes": {
111-
"origin": GitRemote(
112-
name="origin",
113-
fetch_url=f"ssh://{url_to_repo}",
114-
push_url=f"ssh://{url_to_repo}",
115-
),
109+
"origin": {
110+
"fetch_url": f"ssh://{url_to_repo}",
111+
"push_url": f"ssh://{url_to_repo}",
112+
},
116113
},
117114
"vcs": vcs,
118115
}

0 commit comments

Comments
 (0)