From f08395187693735d6529855eba66aad4e3510c28 Mon Sep 17 00:00:00 2001
From: Adrien Lescourt <adrien@lescourt.net>
Date: Thu, 10 Apr 2025 10:49:05 +0200
Subject: [PATCH] Fix clone

---
 README.md  | 18 +++++++-----------
 pwm/pwm.py |  8 +-------
 2 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/README.md b/README.md
index ecd2314..ea9d017 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,13 @@
 
 # Practical Work Manager (pwm)
 
-# WIP REFACTOR STATUS
-
-- [x] Create group repo
-- [ ] Clone repo
-- [x] List groups
-- [x] List projects
-- [x] Replace emails with aai
-- [x] pipx installer 
-- [x] Simplified cli
-- [x] Lighter doc
-- [x] Fix env var handling
+## BREAKING CHANGES REFACTOR 
+
+- Using AAI login instead of emails
+- pipx installer
+- CLI changed
+- Fork feature removed (will be re introduced if needed)
+- gitedu_token file path moved
 
 Programme python pour gérer les travaux pratiques des étudiants avec la contrainte d'utiliser le gitlab d'HEPIA.
 Ce script permet d'automatiser de nombreuses tâches, notamment la création de nombreuses repositories d'un coup, ou encore cloner toutes les repositories contenues dans un groupe, etc.
diff --git a/pwm/pwm.py b/pwm/pwm.py
index 5e08b93..b41582b 100755
--- a/pwm/pwm.py
+++ b/pwm/pwm.py
@@ -338,7 +338,7 @@ def command_create_group_repos(args):
 
 def command_clone_all(args):
     gl = Gitlab(args.token)
-    gl.clone_all(args.id, args.directory, args.until_date)
+    gl.clone_all(args.group_id, args.directory, args.until_date)
 
 
 def command_list_projects(args):
@@ -428,7 +428,6 @@ def main():
     parser_group_repos.set_defaults(func=command_create_group_repos)
 
     parser_clone = subparsers.add_parser("clone", help="Clone the repositories locally")
-    group_clone = parser_clone.add_mutually_exclusive_group()
     parser_clone.add_argument(
         "group_id",
         metavar="GROUP_ID",
@@ -444,11 +443,6 @@ def main():
         "--until_date",
         help='Do a git checkout for all repositories at given date, format "YYYY-MM-DD hh:mm" (optional).',
     )
-    parser_clone.add_argument(
-        "--use_http",
-        help="Use the HTTP client instead of SSH. False by default.",
-        action="store_true",
-    )
     parser_clone.set_defaults(func=command_clone_all)
 
     parser_list = subparsers.add_parser(
-- 
GitLab