[sysadmin-bin] Use SSH URI format required by GitLab
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Use SSH URI format required by GitLab
- Date: Fri, 17 Jul 2020 10:55:34 +0000 (UTC)
commit c274773fc85f085fe5cc3009094d69dea24b46e3
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Fri Jul 17 12:55:10 2020 +0200
Use SSH URI format required by GitLab
gitlab/mirror2github | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gitlab/mirror2github b/gitlab/mirror2github
index 3bcb09d..fd0b211 100755
--- a/gitlab/mirror2github
+++ b/gitlab/mirror2github
@@ -20,6 +20,8 @@ def get_token(token_env, token_filename):
print(f"Could not find {token_env} token", file=sys.stderr)
sys.exit(1)
+ return token
+
def main():
gitlab_token = get_token("GITLAB_TOKEN", "gitlab_rw")
@@ -54,7 +56,8 @@ def main():
prj = gl.projects.get(prj.id, lazy=True)
mirrors = prj.remote_mirrors.list(all=True, lazy=True)
if not len(mirrors):
- prj.remote_mirrors.create({"url": gh_mirror.ssh_url, "enabled": True})
+ ssh_url = f"ssh://git github com/GNOME/{prj.name}.git"
+ prj.remote_mirrors.create({"url": ssh_url, "enabled": True})
if __name__ == '__main__':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]