Adding a gitea remote when creating the git repo

This commit is contained in:
Stephan Kulow
2022-11-06 12:18:16 +01:00
parent 5e495dbd95
commit 9e895e34b6
2 changed files with 33 additions and 2 deletions

View File

@@ -22,7 +22,12 @@ class GitExporter:
repodir / package,
committer="Git OBS Bridge",
committer_email="obsbridge@suse.de",
).create()
)
if self.git.exists():
self.git.open()
else:
self.git.create()
self.git.add_gitea_remote(package)
self.state_file = os.path.join(self.git.path, ".git", "_flat_state.yaml")
self.gc_interval = 200
self.cachedir = cachedir